from .utils import *
from .message import *


lookup_dict_LIGHTING_COMMAND = {
    0: "Idle",
    1: "Detect Devices",
    2: "Reboot",
    3: "Factory Reset",
    4: "Powering Up",
}
def lookup_LIGHTING_COMMAND(value):
    return lookup_dict_LIGHTING_COMMAND.get(value, "Unknown")

lookup_dict_encode_LIGHTING_COMMAND = {
    "Idle" : 0,
    "Detect Devices" : 1,
    "Reboot" : 2,
    "Factory Reset" : 3,
    "Powering Up" : 4,
}
def lookup_encode_LIGHTING_COMMAND(value):
    result = lookup_dict_encode_LIGHTING_COMMAND.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from LIGHTING_COMMAND")
    return result

lookup_dict_INDUSTRY_CODE = {
    0: "Global",
    1: "Highway",
    2: "Agriculture",
    3: "Construction",
    4: "Marine",
    5: "Industrial",
}
def lookup_INDUSTRY_CODE(value):
    return lookup_dict_INDUSTRY_CODE.get(value, "Unknown")

lookup_dict_encode_INDUSTRY_CODE = {
    "Global" : 0,
    "Highway" : 1,
    "Agriculture" : 2,
    "Construction" : 3,
    "Marine" : 4,
    "Industrial" : 5,
}
def lookup_encode_INDUSTRY_CODE(value):
    result = lookup_dict_encode_INDUSTRY_CODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from INDUSTRY_CODE")
    return result

lookup_dict_MANUFACTURER_CODE = {
    69: "ARKS Enterprises, Inc.",
    78: "FW Murphy/Enovation Controls",
    80: "Twin Disc",
    85: "Kohler Power Systems",
    88: "Hemisphere GPS Inc",
    116: "BEP Marine",
    135: "Airmar",
    137: "Maretron",
    140: "Lowrance",
    144: "Mercury Marine",
    147: "Nautibus Electronic GmbH",
    148: "Blue Water Data",
    154: "Westerbeke",
    161: "Offshore Systems (UK) Ltd.",
    163: "Evinrude/BRP",
    165: "CPAC Systems AB",
    168: "Xantrex Technology Inc.",
    172: "Yanmar Marine",
    174: "Volvo Penta",
    175: "Honda Marine",
    176: "Carling Technologies Inc. (Moritz Aerospace)",
    185: "Beede Instruments",
    192: "Floscan Instrument Co. Inc.",
    193: "Nobletec",
    198: "Mystic Valley Communications",
    199: "Actia",
    200: "Honda Marine",
    201: "Disenos Y Technologia",
    211: "Digital Switching Systems",
    215: "Xintex/Atena",
    224: "EMMI NETWORK S.L.",
    225: "Honda Marine",
    228: "ZF",
    229: "Garmin",
    233: "Yacht Monitoring Solutions",
    235: "Sailormade Marine Telemetry/Tetra Technology LTD",
    243: "Eride",
    250: "Honda Marine",
    257: "Honda Motor Company LTD",
    272: "Groco",
    273: "Actisense",
    274: "Amphenol LTW Technology",
    275: "Navico",
    283: "Hamilton Jet",
    285: "Sea Recovery",
    286: "Coelmo SRL Italy",
    295: "BEP Marine",
    304: "Empir Bus",
    305: "NovAtel",
    306: "Sleipner Motor AS",
    307: "MBW Technologies",
    311: "Fischer Panda",
    315: "ICOM",
    328: "Qwerty",
    329: "Dief",
    341: "Boening Automationstechnologie GmbH & Co. KG",
    345: "Korean Maritime University",
    351: "Thrane and Thrane",
    355: "Mastervolt",
    356: "Fischer Panda Generators",
    358: "Victron Energy",
    370: "Rolls Royce Marine",
    373: "Electronic Design",
    374: "Northern Lights",
    378: "Glendinning",
    381: "B & G",
    384: "Rose Point Navigation Systems",
    385: "Johnson Outdoors Marine Electronics Inc Geonav",
    394: "Capi 2",
    396: "Beyond Measure",
    400: "Livorsi Marine",
    404: "ComNav",
    409: "Chetco",
    419: "Fusion Electronics",
    421: "Standard Horizon",
    422: "True Heading AB",
    426: "Egersund Marine Electronics AS",
    427: "em-trak Marine Electronics",
    431: "Tohatsu Co, JP",
    437: "Digital Yacht",
    438: "Comar Systems Limited",
    440: "Cummins",
    443: "VDO (aka Continental-Corporation)",
    451: "Parker Hannifin aka Village Marine Tech",
    459: "Alltek Marine Electronics Corp",
    460: "SAN GIORGIO S.E.I.N",
    466: "Veethree Electronics & Marine",
    467: "Humminbird Marine Electronics",
    470: "SI-TEX Marine Electronics",
    471: "Sea Cross Marine AB",
    475: "GME aka Standard Communications Pty LTD",
    476: "Humminbird Marine Electronics",
    478: "Ocean Sat BV",
    481: "Chetco Digitial Instruments",
    493: "Watcheye",
    499: "Lcj Capteurs",
    502: "Attwood Marine",
    503: "Naviop S.R.L.",
    504: "Vesper Marine Ltd",
    510: "Marinesoft Co. LTD",
    517: "NoLand Engineering",
    518: "Transas USA",
    529: "National Instruments Korea",
    532: "Onwa Marine",
    571: "Marinecraft (South Korea)",
    573: "McMurdo Group aka Orolia LTD",
    578: "Advansea",
    579: "KVH",
    580: "San Jose Technology",
    583: "Yacht Control",
    586: "Suzuki Motor Corporation",
    591: "US Coast Guard",
    595: "Ship Module aka Customware",
    600: "Aquatic AV",
    605: "Aventics GmbH",
    606: "Intellian",
    612: "SamwonIT",
    614: "Arlt Tecnologies",
    637: "Bavaria Yacts",
    641: "Diverse Yacht Services",
    644: "Wema U.S.A dba KUS",
    645: "Garmin",
    658: "Shenzhen Jiuzhou Himunication",
    688: "Rockford Corp",
    704: "JL Audio",
    715: "Autonnic",
    717: "Yacht Devices",
    734: "REAP Systems",
    735: "Au Electronics Group",
    739: "LxNav",
    743: "DaeMyung",
    744: "Woosung",
    773: "Clarion US",
    776: "HMI Systems",
    777: "Ocean Signal",
    778: "Seekeeper",
    781: "Poly Planar",
    785: "Fischer Panda DE",
    795: "Broyda Industries",
    796: "Canadian Automotive",
    797: "Tides Marine",
    798: "Lumishore",
    799: "Still Water Designs and Audio",
    802: "BJ Technologies (Beneteau)",
    803: "Gill Sensors",
    811: "Blue Water Desalination",
    815: "FLIR",
    824: "Undheim Systems",
    838: "TeamSurv",
    844: "Fell Marine",
    847: "Oceanvolt",
    862: "Prospec",
    868: "Data Panel Corp",
    890: "L3 Technologies",
    894: "Rhodan Marine Systems",
    896: "Nexfour Solutions",
    905: "ASA Electronics",
    909: "Marines Co (South Korea)",
    911: "Nautic-on",
    930: "Ecotronix",
    962: "Timbolier Industries",
    963: "TJC Micro",
    968: "Cox Powertrain",
    969: "Blue Seas",
    1417: "Revatek",
    1850: "Teleflex Marine (SeaStar Solutions)",
    1851: "Raymarine",
    1852: "Navionics",
    1853: "Japan Radio Co",
    1854: "Northstar Technologies",
    1855: "Furuno",
    1856: "Trimble",
    1857: "Simrad",
    1858: "Litton",
    1859: "Kvasar AB",
    1860: "MMP",
    1861: "Vector Cantech",
    1862: "Yamaha Marine",
    1863: "Faria Instruments",
}
def lookup_MANUFACTURER_CODE(value):
    return lookup_dict_MANUFACTURER_CODE.get(value, "Unknown")

lookup_dict_encode_MANUFACTURER_CODE = {
    "ARKS Enterprises, Inc." : 69,
    "FW Murphy/Enovation Controls" : 78,
    "Twin Disc" : 80,
    "Kohler Power Systems" : 85,
    "Hemisphere GPS Inc" : 88,
    "BEP Marine" : 116,
    "Airmar" : 135,
    "Maretron" : 137,
    "Lowrance" : 140,
    "Mercury Marine" : 144,
    "Nautibus Electronic GmbH" : 147,
    "Blue Water Data" : 148,
    "Westerbeke" : 154,
    "Offshore Systems (UK) Ltd." : 161,
    "Evinrude/BRP" : 163,
    "CPAC Systems AB" : 165,
    "Xantrex Technology Inc." : 168,
    "Yanmar Marine" : 172,
    "Volvo Penta" : 174,
    "Honda Marine" : 175,
    "Carling Technologies Inc. (Moritz Aerospace)" : 176,
    "Beede Instruments" : 185,
    "Floscan Instrument Co. Inc." : 192,
    "Nobletec" : 193,
    "Mystic Valley Communications" : 198,
    "Actia" : 199,
    "Honda Marine" : 200,
    "Disenos Y Technologia" : 201,
    "Digital Switching Systems" : 211,
    "Xintex/Atena" : 215,
    "EMMI NETWORK S.L." : 224,
    "Honda Marine" : 225,
    "ZF" : 228,
    "Garmin" : 229,
    "Yacht Monitoring Solutions" : 233,
    "Sailormade Marine Telemetry/Tetra Technology LTD" : 235,
    "Eride" : 243,
    "Honda Marine" : 250,
    "Honda Motor Company LTD" : 257,
    "Groco" : 272,
    "Actisense" : 273,
    "Amphenol LTW Technology" : 274,
    "Navico" : 275,
    "Hamilton Jet" : 283,
    "Sea Recovery" : 285,
    "Coelmo SRL Italy" : 286,
    "BEP Marine" : 295,
    "Empir Bus" : 304,
    "NovAtel" : 305,
    "Sleipner Motor AS" : 306,
    "MBW Technologies" : 307,
    "Fischer Panda" : 311,
    "ICOM" : 315,
    "Qwerty" : 328,
    "Dief" : 329,
    "Boening Automationstechnologie GmbH & Co. KG" : 341,
    "Korean Maritime University" : 345,
    "Thrane and Thrane" : 351,
    "Mastervolt" : 355,
    "Fischer Panda Generators" : 356,
    "Victron Energy" : 358,
    "Rolls Royce Marine" : 370,
    "Electronic Design" : 373,
    "Northern Lights" : 374,
    "Glendinning" : 378,
    "B & G" : 381,
    "Rose Point Navigation Systems" : 384,
    "Johnson Outdoors Marine Electronics Inc Geonav" : 385,
    "Capi 2" : 394,
    "Beyond Measure" : 396,
    "Livorsi Marine" : 400,
    "ComNav" : 404,
    "Chetco" : 409,
    "Fusion Electronics" : 419,
    "Standard Horizon" : 421,
    "True Heading AB" : 422,
    "Egersund Marine Electronics AS" : 426,
    "em-trak Marine Electronics" : 427,
    "Tohatsu Co, JP" : 431,
    "Digital Yacht" : 437,
    "Comar Systems Limited" : 438,
    "Cummins" : 440,
    "VDO (aka Continental-Corporation)" : 443,
    "Parker Hannifin aka Village Marine Tech" : 451,
    "Alltek Marine Electronics Corp" : 459,
    "SAN GIORGIO S.E.I.N" : 460,
    "Veethree Electronics & Marine" : 466,
    "Humminbird Marine Electronics" : 467,
    "SI-TEX Marine Electronics" : 470,
    "Sea Cross Marine AB" : 471,
    "GME aka Standard Communications Pty LTD" : 475,
    "Humminbird Marine Electronics" : 476,
    "Ocean Sat BV" : 478,
    "Chetco Digitial Instruments" : 481,
    "Watcheye" : 493,
    "Lcj Capteurs" : 499,
    "Attwood Marine" : 502,
    "Naviop S.R.L." : 503,
    "Vesper Marine Ltd" : 504,
    "Marinesoft Co. LTD" : 510,
    "NoLand Engineering" : 517,
    "Transas USA" : 518,
    "National Instruments Korea" : 529,
    "Onwa Marine" : 532,
    "Marinecraft (South Korea)" : 571,
    "McMurdo Group aka Orolia LTD" : 573,
    "Advansea" : 578,
    "KVH" : 579,
    "San Jose Technology" : 580,
    "Yacht Control" : 583,
    "Suzuki Motor Corporation" : 586,
    "US Coast Guard" : 591,
    "Ship Module aka Customware" : 595,
    "Aquatic AV" : 600,
    "Aventics GmbH" : 605,
    "Intellian" : 606,
    "SamwonIT" : 612,
    "Arlt Tecnologies" : 614,
    "Bavaria Yacts" : 637,
    "Diverse Yacht Services" : 641,
    "Wema U.S.A dba KUS" : 644,
    "Garmin" : 645,
    "Shenzhen Jiuzhou Himunication" : 658,
    "Rockford Corp" : 688,
    "JL Audio" : 704,
    "Autonnic" : 715,
    "Yacht Devices" : 717,
    "REAP Systems" : 734,
    "Au Electronics Group" : 735,
    "LxNav" : 739,
    "DaeMyung" : 743,
    "Woosung" : 744,
    "Clarion US" : 773,
    "HMI Systems" : 776,
    "Ocean Signal" : 777,
    "Seekeeper" : 778,
    "Poly Planar" : 781,
    "Fischer Panda DE" : 785,
    "Broyda Industries" : 795,
    "Canadian Automotive" : 796,
    "Tides Marine" : 797,
    "Lumishore" : 798,
    "Still Water Designs and Audio" : 799,
    "BJ Technologies (Beneteau)" : 802,
    "Gill Sensors" : 803,
    "Blue Water Desalination" : 811,
    "FLIR" : 815,
    "Undheim Systems" : 824,
    "TeamSurv" : 838,
    "Fell Marine" : 844,
    "Oceanvolt" : 847,
    "Prospec" : 862,
    "Data Panel Corp" : 868,
    "L3 Technologies" : 890,
    "Rhodan Marine Systems" : 894,
    "Nexfour Solutions" : 896,
    "ASA Electronics" : 905,
    "Marines Co (South Korea)" : 909,
    "Nautic-on" : 911,
    "Ecotronix" : 930,
    "Timbolier Industries" : 962,
    "TJC Micro" : 963,
    "Cox Powertrain" : 968,
    "Blue Seas" : 969,
    "Revatek" : 1417,
    "Teleflex Marine (SeaStar Solutions)" : 1850,
    "Raymarine" : 1851,
    "Navionics" : 1852,
    "Japan Radio Co" : 1853,
    "Northstar Technologies" : 1854,
    "Furuno" : 1855,
    "Trimble" : 1856,
    "Simrad" : 1857,
    "Litton" : 1858,
    "Kvasar AB" : 1859,
    "MMP" : 1860,
    "Vector Cantech" : 1861,
    "Yamaha Marine" : 1862,
    "Faria Instruments" : 1863,
}
def lookup_encode_MANUFACTURER_CODE(value):
    result = lookup_dict_encode_MANUFACTURER_CODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from MANUFACTURER_CODE")
    return result

lookup_dict_AIS_MESSAGE_ID = {
    1: "Scheduled Class A position report",
    2: "Assigned scheduled Class A position report",
    3: "Interrogated Class A position report",
    4: "Base station report",
    5: "Static and voyage related data",
    6: "Binary addressed message",
    7: "Binary acknowledgement",
    8: "Binary broadcast message",
    9: "Standard SAR aircraft position report",
    10: "UTC/date inquiry",
    11: "UTC/date response",
    12: "Safety related addressed message",
    13: "Safety related acknowledgement",
    14: "Satety related broadcast message",
    15: "Interrogation",
    16: "Assignment mode command",
    17: "DGNSS broadcast binary message",
    18: "Standard Class B position report",
    19: "Extended Class B position report",
    20: "Data link management message",
    21: "ATON report",
    22: "Channel management",
    23: "Group assignment command",
    24: "Static data report",
    25: "Single slot binary message",
    26: "Multiple slot binary message",
    27: "Position report for long range applications",
}
def lookup_AIS_MESSAGE_ID(value):
    return lookup_dict_AIS_MESSAGE_ID.get(value, "Unknown")

lookup_dict_encode_AIS_MESSAGE_ID = {
    "Scheduled Class A position report" : 1,
    "Assigned scheduled Class A position report" : 2,
    "Interrogated Class A position report" : 3,
    "Base station report" : 4,
    "Static and voyage related data" : 5,
    "Binary addressed message" : 6,
    "Binary acknowledgement" : 7,
    "Binary broadcast message" : 8,
    "Standard SAR aircraft position report" : 9,
    "UTC/date inquiry" : 10,
    "UTC/date response" : 11,
    "Safety related addressed message" : 12,
    "Safety related acknowledgement" : 13,
    "Satety related broadcast message" : 14,
    "Interrogation" : 15,
    "Assignment mode command" : 16,
    "DGNSS broadcast binary message" : 17,
    "Standard Class B position report" : 18,
    "Extended Class B position report" : 19,
    "Data link management message" : 20,
    "ATON report" : 21,
    "Channel management" : 22,
    "Group assignment command" : 23,
    "Static data report" : 24,
    "Single slot binary message" : 25,
    "Multiple slot binary message" : 26,
    "Position report for long range applications" : 27,
}
def lookup_encode_AIS_MESSAGE_ID(value):
    result = lookup_dict_encode_AIS_MESSAGE_ID.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIS_MESSAGE_ID")
    return result

lookup_dict_SHIP_TYPE = {
    0: "Unavailable",
    20: "Wing In Ground",
    21: "Wing In Ground (hazard cat X)",
    22: "Wing In Ground (hazard cat Y)",
    23: "Wing In Ground (hazard cat Z)",
    24: "Wing In Ground (hazard cat OS)",
    29: "Wing In Ground (no additional information)",
    30: "Fishing",
    31: "Towing",
    32: "Towing exceeds 200m or wider than 25m",
    33: "Engaged in dredging or underwater operations",
    34: "Engaged in diving operations",
    35: "Engaged in military operations",
    36: "Sailing",
    37: "Pleasure",
    40: "High speed craft",
    41: "High speed craft (hazard cat X)",
    42: "High speed craft (hazard cat Y)",
    43: "High speed craft (hazard cat Z)",
    44: "High speed craft (hazard cat OS)",
    49: "High speed craft (no additional information)",
    50: "Pilot vessel",
    51: "SAR",
    52: "Tug",
    53: "Port tender",
    54: "Anti-pollution",
    55: "Law enforcement",
    56: "Spare",
    57: "Spare #2",
    58: "Medical",
    59: "Ships and aircraft of States not parties to an armed conflict",
    60: "Passenger ship",
    61: "Passenger ship (hazard cat X)",
    62: "Passenger ship (hazard cat Y)",
    63: "Passenger ship (hazard cat Z)",
    64: "Passenger ship (hazard cat OS)",
    69: "Passenger ship (no additional information)",
    70: "Cargo ship",
    71: "Cargo ship (hazard cat X)",
    72: "Cargo ship (hazard cat Y)",
    73: "Cargo ship (hazard cat Z)",
    74: "Cargo ship (hazard cat OS)",
    79: "Cargo ship (no additional information)",
    80: "Tanker",
    81: "Tanker (hazard cat X)",
    82: "Tanker (hazard cat Y)",
    83: "Tanker (hazard cat Z)",
    84: "Tanker (hazard cat OS)",
    89: "Tanker (no additional information)",
    90: "Other",
    91: "Other (hazard cat X)",
    92: "Other (hazard cat Y)",
    93: "Other (hazard cat Z)",
    94: "Other (hazard cat OS)",
    99: "Other (no additional information)",
}
def lookup_SHIP_TYPE(value):
    return lookup_dict_SHIP_TYPE.get(value, "Unknown")

lookup_dict_encode_SHIP_TYPE = {
    "Unavailable" : 0,
    "Wing In Ground" : 20,
    "Wing In Ground (hazard cat X)" : 21,
    "Wing In Ground (hazard cat Y)" : 22,
    "Wing In Ground (hazard cat Z)" : 23,
    "Wing In Ground (hazard cat OS)" : 24,
    "Wing In Ground (no additional information)" : 29,
    "Fishing" : 30,
    "Towing" : 31,
    "Towing exceeds 200m or wider than 25m" : 32,
    "Engaged in dredging or underwater operations" : 33,
    "Engaged in diving operations" : 34,
    "Engaged in military operations" : 35,
    "Sailing" : 36,
    "Pleasure" : 37,
    "High speed craft" : 40,
    "High speed craft (hazard cat X)" : 41,
    "High speed craft (hazard cat Y)" : 42,
    "High speed craft (hazard cat Z)" : 43,
    "High speed craft (hazard cat OS)" : 44,
    "High speed craft (no additional information)" : 49,
    "Pilot vessel" : 50,
    "SAR" : 51,
    "Tug" : 52,
    "Port tender" : 53,
    "Anti-pollution" : 54,
    "Law enforcement" : 55,
    "Spare" : 56,
    "Spare #2" : 57,
    "Medical" : 58,
    "Ships and aircraft of States not parties to an armed conflict" : 59,
    "Passenger ship" : 60,
    "Passenger ship (hazard cat X)" : 61,
    "Passenger ship (hazard cat Y)" : 62,
    "Passenger ship (hazard cat Z)" : 63,
    "Passenger ship (hazard cat OS)" : 64,
    "Passenger ship (no additional information)" : 69,
    "Cargo ship" : 70,
    "Cargo ship (hazard cat X)" : 71,
    "Cargo ship (hazard cat Y)" : 72,
    "Cargo ship (hazard cat Z)" : 73,
    "Cargo ship (hazard cat OS)" : 74,
    "Cargo ship (no additional information)" : 79,
    "Tanker" : 80,
    "Tanker (hazard cat X)" : 81,
    "Tanker (hazard cat Y)" : 82,
    "Tanker (hazard cat Z)" : 83,
    "Tanker (hazard cat OS)" : 84,
    "Tanker (no additional information)" : 89,
    "Other" : 90,
    "Other (hazard cat X)" : 91,
    "Other (hazard cat Y)" : 92,
    "Other (hazard cat Z)" : 93,
    "Other (hazard cat OS)" : 94,
    "Other (no additional information)" : 99,
}
def lookup_encode_SHIP_TYPE(value):
    result = lookup_dict_encode_SHIP_TYPE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SHIP_TYPE")
    return result

lookup_dict_DEVICE_CLASS = {
    0: "Reserved for 2000 Use",
    10: "System tools",
    20: "Safety systems",
    25: "Internetwork device",
    30: "Electrical Distribution",
    35: "Electrical Generation",
    40: "Steering and Control surfaces",
    50: "Propulsion",
    60: "Navigation",
    70: "Communication",
    75: "Sensor Communication Interface",
    80: "Instrumentation/general systems",
    85: "External Environment",
    90: "Internal Environment",
    100: "Deck + cargo + fishing equipment systems",
    110: "Human Interface",
    120: "Display",
    125: "Entertainment",
}
def lookup_DEVICE_CLASS(value):
    return lookup_dict_DEVICE_CLASS.get(value, "Unknown")

lookup_dict_encode_DEVICE_CLASS = {
    "Reserved for 2000 Use" : 0,
    "System tools" : 10,
    "Safety systems" : 20,
    "Internetwork device" : 25,
    "Electrical Distribution" : 30,
    "Electrical Generation" : 35,
    "Steering and Control surfaces" : 40,
    "Propulsion" : 50,
    "Navigation" : 60,
    "Communication" : 70,
    "Sensor Communication Interface" : 75,
    "Instrumentation/general systems" : 80,
    "External Environment" : 85,
    "Internal Environment" : 90,
    "Deck + cargo + fishing equipment systems" : 100,
    "Human Interface" : 110,
    "Display" : 120,
    "Entertainment" : 125,
}
def lookup_encode_DEVICE_CLASS(value):
    result = lookup_dict_encode_DEVICE_CLASS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DEVICE_CLASS")
    return result

lookup_dict_REPEAT_INDICATOR = {
    0: "Initial",
    1: "First retransmission",
    2: "Second retransmission",
    3: "Final retransmission",
}
def lookup_REPEAT_INDICATOR(value):
    return lookup_dict_REPEAT_INDICATOR.get(value, "Unknown")

lookup_dict_encode_REPEAT_INDICATOR = {
    "Initial" : 0,
    "First retransmission" : 1,
    "Second retransmission" : 2,
    "Final retransmission" : 3,
}
def lookup_encode_REPEAT_INDICATOR(value):
    result = lookup_dict_encode_REPEAT_INDICATOR.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from REPEAT_INDICATOR")
    return result

lookup_dict_TX_RX_MODE = {
    0: "Tx A/Tx B, Rx A/Rx B",
    1: "Tx A, Rx A/Rx B",
    2: "Tx B, Rx A/Rx B",
}
def lookup_TX_RX_MODE(value):
    return lookup_dict_TX_RX_MODE.get(value, "Unknown")

lookup_dict_encode_TX_RX_MODE = {
    "Tx A/Tx B, Rx A/Rx B" : 0,
    "Tx A, Rx A/Rx B" : 1,
    "Tx B, Rx A/Rx B" : 2,
}
def lookup_encode_TX_RX_MODE(value):
    result = lookup_dict_encode_TX_RX_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from TX_RX_MODE")
    return result

lookup_dict_STATION_TYPE = {
    0: "All types of mobile station",
    2: "All types of Class B mobile station",
    3: "SAR airborne mobile station",
    4: "AtoN station",
    5: "Class B CS shipborne mobile station",
    6: "Inland waterways",
    7: "Regional use 7",
    8: "Regional use 8",
    9: "Regional use 9",
}
def lookup_STATION_TYPE(value):
    return lookup_dict_STATION_TYPE.get(value, "Unknown")

lookup_dict_encode_STATION_TYPE = {
    "All types of mobile station" : 0,
    "All types of Class B mobile station" : 2,
    "SAR airborne mobile station" : 3,
    "AtoN station" : 4,
    "Class B CS shipborne mobile station" : 5,
    "Inland waterways" : 6,
    "Regional use 7" : 7,
    "Regional use 8" : 8,
    "Regional use 9" : 9,
}
def lookup_encode_STATION_TYPE(value):
    result = lookup_dict_encode_STATION_TYPE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from STATION_TYPE")
    return result

lookup_dict_REPORTING_INTERVAL = {
    0: "As given by the autonomous mode",
    1: "10 min",
    2: "6 min",
    3: "3 min",
    4: "1 min",
    5: "30 sec",
    6: "15 sec",
    7: "10 sec",
    8: "5 sec",
    9: "2 sec (not applicable to Class B CS)",
    10: "Next shorter reporting interval",
    11: "Next longer reporting interval",
}
def lookup_REPORTING_INTERVAL(value):
    return lookup_dict_REPORTING_INTERVAL.get(value, "Unknown")

lookup_dict_encode_REPORTING_INTERVAL = {
    "As given by the autonomous mode" : 0,
    "10 min" : 1,
    "6 min" : 2,
    "3 min" : 3,
    "1 min" : 4,
    "30 sec" : 5,
    "15 sec" : 6,
    "10 sec" : 7,
    "5 sec" : 8,
    "2 sec (not applicable to Class B CS)" : 9,
    "Next shorter reporting interval" : 10,
    "Next longer reporting interval" : 11,
}
def lookup_encode_REPORTING_INTERVAL(value):
    result = lookup_dict_encode_REPORTING_INTERVAL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from REPORTING_INTERVAL")
    return result

lookup_dict_AIS_TRANSCEIVER = {
    0: "Channel A VDL reception",
    1: "Channel B VDL reception",
    2: "Channel A VDL transmission",
    3: "Channel B VDL transmission",
    4: "Own information not broadcast",
    5: "Reserved",
}
def lookup_AIS_TRANSCEIVER(value):
    return lookup_dict_AIS_TRANSCEIVER.get(value, "Unknown")

lookup_dict_encode_AIS_TRANSCEIVER = {
    "Channel A VDL reception" : 0,
    "Channel B VDL reception" : 1,
    "Channel A VDL transmission" : 2,
    "Channel B VDL transmission" : 3,
    "Own information not broadcast" : 4,
    "Reserved" : 5,
}
def lookup_encode_AIS_TRANSCEIVER(value):
    result = lookup_dict_encode_AIS_TRANSCEIVER.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIS_TRANSCEIVER")
    return result

lookup_dict_AIS_ASSIGNED_MODE = {
    0: "Autonomous and continuous",
    1: "Assigned mode",
}
def lookup_AIS_ASSIGNED_MODE(value):
    return lookup_dict_AIS_ASSIGNED_MODE.get(value, "Unknown")

lookup_dict_encode_AIS_ASSIGNED_MODE = {
    "Autonomous and continuous" : 0,
    "Assigned mode" : 1,
}
def lookup_encode_AIS_ASSIGNED_MODE(value):
    result = lookup_dict_encode_AIS_ASSIGNED_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIS_ASSIGNED_MODE")
    return result

lookup_dict_ATON_TYPE = {
    0: "Default: Type of AtoN not specified",
    1: "Reference point",
    2: "RACON",
    3: "Fixed structure off-shore",
    4: "Reserved for future use",
    5: "Fixed light: without sectors",
    6: "Fixed light: with sectors",
    7: "Fixed leading light front",
    8: "Fixed leading light rear",
    9: "Fixed beacon: cardinal N",
    10: "Fixed beacon: cardinal E",
    11: "Fixed beacon: cardinal S",
    12: "Fixed beacon: cardinal W",
    13: "Fixed beacon: port hand",
    14: "Fixed beacon: starboard hand",
    15: "Fixed beacon: preferred channel port hand",
    16: "Fixed beacon: preferred channel starboard hand",
    17: "Fixed beacon: isolated danger",
    18: "Fixed beacon: safe water",
    19: "Fixed beacon: special mark",
    20: "Floating AtoN: cardinal N",
    21: "Floating AtoN: cardinal E",
    22: "Floating AtoN: cardinal S",
    23: "Floating AtoN: cardinal W",
    24: "Floating AtoN: port hand mark",
    25: "Floating AtoN: starboard hand mark",
    26: "Floating AtoN: preferred channel port hand",
    27: "Floating AtoN: preferred channel starboard hand",
    28: "Floating AtoN: isolated danger",
    29: "Floating AtoN: safe water",
    30: "Floating AtoN: special mark",
    31: "Floating AtoN: light vessel/LANBY/rigs",
}
def lookup_ATON_TYPE(value):
    return lookup_dict_ATON_TYPE.get(value, "Unknown")

lookup_dict_encode_ATON_TYPE = {
    "Default: Type of AtoN not specified" : 0,
    "Reference point" : 1,
    "RACON" : 2,
    "Fixed structure off-shore" : 3,
    "Reserved for future use" : 4,
    "Fixed light: without sectors" : 5,
    "Fixed light: with sectors" : 6,
    "Fixed leading light front" : 7,
    "Fixed leading light rear" : 8,
    "Fixed beacon: cardinal N" : 9,
    "Fixed beacon: cardinal E" : 10,
    "Fixed beacon: cardinal S" : 11,
    "Fixed beacon: cardinal W" : 12,
    "Fixed beacon: port hand" : 13,
    "Fixed beacon: starboard hand" : 14,
    "Fixed beacon: preferred channel port hand" : 15,
    "Fixed beacon: preferred channel starboard hand" : 16,
    "Fixed beacon: isolated danger" : 17,
    "Fixed beacon: safe water" : 18,
    "Fixed beacon: special mark" : 19,
    "Floating AtoN: cardinal N" : 20,
    "Floating AtoN: cardinal E" : 21,
    "Floating AtoN: cardinal S" : 22,
    "Floating AtoN: cardinal W" : 23,
    "Floating AtoN: port hand mark" : 24,
    "Floating AtoN: starboard hand mark" : 25,
    "Floating AtoN: preferred channel port hand" : 26,
    "Floating AtoN: preferred channel starboard hand" : 27,
    "Floating AtoN: isolated danger" : 28,
    "Floating AtoN: safe water" : 29,
    "Floating AtoN: special mark" : 30,
    "Floating AtoN: light vessel/LANBY/rigs" : 31,
}
def lookup_encode_ATON_TYPE(value):
    result = lookup_dict_encode_ATON_TYPE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ATON_TYPE")
    return result

lookup_dict_AIS_SPECIAL_MANEUVER = {
    0: "Not available",
    1: "Not engaged in special maneuver",
    2: "Engaged in special maneuver",
    3: "Reserved",
}
def lookup_AIS_SPECIAL_MANEUVER(value):
    return lookup_dict_AIS_SPECIAL_MANEUVER.get(value, "Unknown")

lookup_dict_encode_AIS_SPECIAL_MANEUVER = {
    "Not available" : 0,
    "Not engaged in special maneuver" : 1,
    "Engaged in special maneuver" : 2,
    "Reserved" : 3,
}
def lookup_encode_AIS_SPECIAL_MANEUVER(value):
    result = lookup_dict_encode_AIS_SPECIAL_MANEUVER.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIS_SPECIAL_MANEUVER")
    return result

lookup_dict_POSITION_FIX_DEVICE = {
    0: "Default: undefined",
    1: "GPS",
    2: "GLONASS",
    3: "Combined GPS/GLONASS",
    4: "Loran-C",
    5: "Chayka",
    6: "Integrated navigation system",
    7: "Surveyed",
    8: "Galileo",
    15: "Internal GNSS",
}
def lookup_POSITION_FIX_DEVICE(value):
    return lookup_dict_POSITION_FIX_DEVICE.get(value, "Unknown")

lookup_dict_encode_POSITION_FIX_DEVICE = {
    "Default: undefined" : 0,
    "GPS" : 1,
    "GLONASS" : 2,
    "Combined GPS/GLONASS" : 3,
    "Loran-C" : 4,
    "Chayka" : 5,
    "Integrated navigation system" : 6,
    "Surveyed" : 7,
    "Galileo" : 8,
    "Internal GNSS" : 15,
}
def lookup_encode_POSITION_FIX_DEVICE(value):
    result = lookup_dict_encode_POSITION_FIX_DEVICE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from POSITION_FIX_DEVICE")
    return result

lookup_dict_GNS = {
    0: "GPS",
    1: "GLONASS",
    2: "GPS+GLONASS",
    3: "GPS+SBAS/WAAS",
    4: "GPS+SBAS/WAAS+GLONASS",
    5: "Chayka",
    6: "integrated",
    7: "surveyed",
    8: "Galileo",
}
def lookup_GNS(value):
    return lookup_dict_GNS.get(value, "Unknown")

lookup_dict_encode_GNS = {
    "GPS" : 0,
    "GLONASS" : 1,
    "GPS+GLONASS" : 2,
    "GPS+SBAS/WAAS" : 3,
    "GPS+SBAS/WAAS+GLONASS" : 4,
    "Chayka" : 5,
    "integrated" : 6,
    "surveyed" : 7,
    "Galileo" : 8,
}
def lookup_encode_GNS(value):
    result = lookup_dict_encode_GNS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from GNS")
    return result

lookup_dict_ENGINE_INSTANCE = {
    0: "Single Engine or Dual Engine Port",
    1: "Dual Engine Starboard",
}
def lookup_ENGINE_INSTANCE(value):
    return lookup_dict_ENGINE_INSTANCE.get(value, "Unknown")

lookup_dict_encode_ENGINE_INSTANCE = {
    "Single Engine or Dual Engine Port" : 0,
    "Dual Engine Starboard" : 1,
}
def lookup_encode_ENGINE_INSTANCE(value):
    result = lookup_dict_encode_ENGINE_INSTANCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENGINE_INSTANCE")
    return result

lookup_dict_GEAR_STATUS = {
    0: "Forward",
    1: "Neutral",
    2: "Reverse",
}
def lookup_GEAR_STATUS(value):
    return lookup_dict_GEAR_STATUS.get(value, "Unknown")

lookup_dict_encode_GEAR_STATUS = {
    "Forward" : 0,
    "Neutral" : 1,
    "Reverse" : 2,
}
def lookup_encode_GEAR_STATUS(value):
    result = lookup_dict_encode_GEAR_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from GEAR_STATUS")
    return result

lookup_dict_DIRECTION = {
    0: "Forward",
    1: "Reverse",
}
def lookup_DIRECTION(value):
    return lookup_dict_DIRECTION.get(value, "Unknown")

lookup_dict_encode_DIRECTION = {
    "Forward" : 0,
    "Reverse" : 1,
}
def lookup_encode_DIRECTION(value):
    result = lookup_dict_encode_DIRECTION.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DIRECTION")
    return result

lookup_dict_POSITION_ACCURACY = {
    0: "Low",
    1: "High",
}
def lookup_POSITION_ACCURACY(value):
    return lookup_dict_POSITION_ACCURACY.get(value, "Unknown")

lookup_dict_encode_POSITION_ACCURACY = {
    "Low" : 0,
    "High" : 1,
}
def lookup_encode_POSITION_ACCURACY(value):
    result = lookup_dict_encode_POSITION_ACCURACY.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from POSITION_ACCURACY")
    return result

lookup_dict_RAIM_FLAG = {
    0: "not in use",
    1: "in use",
}
def lookup_RAIM_FLAG(value):
    return lookup_dict_RAIM_FLAG.get(value, "Unknown")

lookup_dict_encode_RAIM_FLAG = {
    "not in use" : 0,
    "in use" : 1,
}
def lookup_encode_RAIM_FLAG(value):
    result = lookup_dict_encode_RAIM_FLAG.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from RAIM_FLAG")
    return result

lookup_dict_TIME_STAMP = {
    60: "Not available",
    61: "Manual input mode",
    62: "Dead reckoning mode",
    63: "Positioning system is inoperative",
}
def lookup_TIME_STAMP(value):
    return lookup_dict_TIME_STAMP.get(value, "Unknown")

lookup_dict_encode_TIME_STAMP = {
    "Not available" : 60,
    "Manual input mode" : 61,
    "Dead reckoning mode" : 62,
    "Positioning system is inoperative" : 63,
}
def lookup_encode_TIME_STAMP(value):
    result = lookup_dict_encode_TIME_STAMP.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from TIME_STAMP")
    return result

lookup_dict_GNS_METHOD = {
    0: "no GNSS",
    1: "GNSS fix",
    2: "DGNSS fix",
    3: "Precise GNSS",
    4: "RTK Fixed Integer",
    5: "RTK float",
    6: "Estimated (DR) mode",
    7: "Manual Input",
    8: "Simulate mode",
}
def lookup_GNS_METHOD(value):
    return lookup_dict_GNS_METHOD.get(value, "Unknown")

lookup_dict_encode_GNS_METHOD = {
    "no GNSS" : 0,
    "GNSS fix" : 1,
    "DGNSS fix" : 2,
    "Precise GNSS" : 3,
    "RTK Fixed Integer" : 4,
    "RTK float" : 5,
    "Estimated (DR) mode" : 6,
    "Manual Input" : 7,
    "Simulate mode" : 8,
}
def lookup_encode_GNS_METHOD(value):
    result = lookup_dict_encode_GNS_METHOD.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from GNS_METHOD")
    return result

lookup_dict_GNS_INTEGRITY = {
    0: "No integrity checking",
    1: "Safe",
    2: "Caution",
}
def lookup_GNS_INTEGRITY(value):
    return lookup_dict_GNS_INTEGRITY.get(value, "Unknown")

lookup_dict_encode_GNS_INTEGRITY = {
    "No integrity checking" : 0,
    "Safe" : 1,
    "Caution" : 2,
}
def lookup_encode_GNS_INTEGRITY(value):
    result = lookup_dict_encode_GNS_INTEGRITY.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from GNS_INTEGRITY")
    return result

lookup_dict_SYSTEM_TIME = {
    0: "GPS",
    1: "GLONASS",
    2: "Radio Station",
    3: "Local Cesium clock",
    4: "Local Rubidium clock",
    5: "Local Crystal clock",
}
def lookup_SYSTEM_TIME(value):
    return lookup_dict_SYSTEM_TIME.get(value, "Unknown")

lookup_dict_encode_SYSTEM_TIME = {
    "GPS" : 0,
    "GLONASS" : 1,
    "Radio Station" : 2,
    "Local Cesium clock" : 3,
    "Local Rubidium clock" : 4,
    "Local Crystal clock" : 5,
}
def lookup_encode_SYSTEM_TIME(value):
    result = lookup_dict_encode_SYSTEM_TIME.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SYSTEM_TIME")
    return result

lookup_dict_MAGNETIC_VARIATION = {
    0: "Manual",
    1: "Automatic Chart",
    2: "Automatic Table",
    3: "Automatic Calculation",
    4: "WMM 2000",
    5: "WMM 2005",
    6: "WMM 2010",
    7: "WMM 2015",
    8: "WMM 2020",
}
def lookup_MAGNETIC_VARIATION(value):
    return lookup_dict_MAGNETIC_VARIATION.get(value, "Unknown")

lookup_dict_encode_MAGNETIC_VARIATION = {
    "Manual" : 0,
    "Automatic Chart" : 1,
    "Automatic Table" : 2,
    "Automatic Calculation" : 3,
    "WMM 2000" : 4,
    "WMM 2005" : 5,
    "WMM 2010" : 6,
    "WMM 2015" : 7,
    "WMM 2020" : 8,
}
def lookup_encode_MAGNETIC_VARIATION(value):
    result = lookup_dict_encode_MAGNETIC_VARIATION.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from MAGNETIC_VARIATION")
    return result

lookup_dict_RESIDUAL_MODE = {
    0: "Autonomous",
    1: "Differential enhanced",
    2: "Estimated",
    3: "Simulator",
    4: "Manual",
}
def lookup_RESIDUAL_MODE(value):
    return lookup_dict_RESIDUAL_MODE.get(value, "Unknown")

lookup_dict_encode_RESIDUAL_MODE = {
    "Autonomous" : 0,
    "Differential enhanced" : 1,
    "Estimated" : 2,
    "Simulator" : 3,
    "Manual" : 4,
}
def lookup_encode_RESIDUAL_MODE(value):
    result = lookup_dict_encode_RESIDUAL_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from RESIDUAL_MODE")
    return result

lookup_dict_WIND_REFERENCE = {
    0: "True (ground referenced to North)",
    1: "Magnetic (ground referenced to Magnetic North)",
    2: "Apparent",
    3: "True (boat referenced)",
    4: "True (water referenced)",
}
def lookup_WIND_REFERENCE(value):
    return lookup_dict_WIND_REFERENCE.get(value, "Unknown")

lookup_dict_encode_WIND_REFERENCE = {
    "True (ground referenced to North)" : 0,
    "Magnetic (ground referenced to Magnetic North)" : 1,
    "Apparent" : 2,
    "True (boat referenced)" : 3,
    "True (water referenced)" : 4,
}
def lookup_encode_WIND_REFERENCE(value):
    result = lookup_dict_encode_WIND_REFERENCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from WIND_REFERENCE")
    return result

lookup_dict_WATER_REFERENCE = {
    0: "Paddle wheel",
    1: "Pitot tube",
    2: "Doppler",
    3: "Correlation (ultra sound)",
    4: "Electro Magnetic",
}
def lookup_WATER_REFERENCE(value):
    return lookup_dict_WATER_REFERENCE.get(value, "Unknown")

lookup_dict_encode_WATER_REFERENCE = {
    "Paddle wheel" : 0,
    "Pitot tube" : 1,
    "Doppler" : 2,
    "Correlation (ultra sound)" : 3,
    "Electro Magnetic" : 4,
}
def lookup_encode_WATER_REFERENCE(value):
    result = lookup_dict_encode_WATER_REFERENCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from WATER_REFERENCE")
    return result

lookup_dict_YES_NO = {
    0: "No",
    1: "Yes",
}
def lookup_YES_NO(value):
    return lookup_dict_YES_NO.get(value, "Unknown")

lookup_dict_encode_YES_NO = {
    "No" : 0,
    "Yes" : 1,
}
def lookup_encode_YES_NO(value):
    result = lookup_dict_encode_YES_NO.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from YES_NO")
    return result

lookup_dict_OK_WARNING = {
    0: "OK",
    1: "Warning",
}
def lookup_OK_WARNING(value):
    return lookup_dict_OK_WARNING.get(value, "Unknown")

lookup_dict_encode_OK_WARNING = {
    "OK" : 0,
    "Warning" : 1,
}
def lookup_encode_OK_WARNING(value):
    result = lookup_dict_encode_OK_WARNING.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from OK_WARNING")
    return result

lookup_dict_OFF_ON = {
    0: "Off",
    1: "On",
}
def lookup_OFF_ON(value):
    return lookup_dict_OFF_ON.get(value, "Unknown")

lookup_dict_encode_OFF_ON = {
    "Off" : 0,
    "On" : 1,
}
def lookup_encode_OFF_ON(value):
    result = lookup_dict_encode_OFF_ON.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from OFF_ON")
    return result

lookup_dict_DIRECTION_REFERENCE = {
    0: "True",
    1: "Magnetic",
    2: "Error",
}
def lookup_DIRECTION_REFERENCE(value):
    return lookup_dict_DIRECTION_REFERENCE.get(value, "Unknown")

lookup_dict_encode_DIRECTION_REFERENCE = {
    "True" : 0,
    "Magnetic" : 1,
    "Error" : 2,
}
def lookup_encode_DIRECTION_REFERENCE(value):
    result = lookup_dict_encode_DIRECTION_REFERENCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DIRECTION_REFERENCE")
    return result

lookup_dict_DIRECTION_RUDDER = {
    0: "No Order",
    1: "Move to starboard",
    2: "Move to port",
}
def lookup_DIRECTION_RUDDER(value):
    return lookup_dict_DIRECTION_RUDDER.get(value, "Unknown")

lookup_dict_encode_DIRECTION_RUDDER = {
    "No Order" : 0,
    "Move to starboard" : 1,
    "Move to port" : 2,
}
def lookup_encode_DIRECTION_RUDDER(value):
    result = lookup_dict_encode_DIRECTION_RUDDER.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DIRECTION_RUDDER")
    return result

lookup_dict_NAV_STATUS = {
    0: "Under way using engine",
    1: "At anchor",
    2: "Not under command",
    3: "Restricted maneuverability",
    4: "Constrained by her draught",
    5: "Moored",
    6: "Aground",
    7: "Engaged in Fishing",
    8: "Under way sailing",
    9: "Hazardous material - High Speed",
    10: "Hazardous material - Wing in Ground",
    11: "Power-driven vessel towing astern",
    12: "Power-driven vessel pushing ahead or towing alongside",
    14: "AIS-SART",
}
def lookup_NAV_STATUS(value):
    return lookup_dict_NAV_STATUS.get(value, "Unknown")

lookup_dict_encode_NAV_STATUS = {
    "Under way using engine" : 0,
    "At anchor" : 1,
    "Not under command" : 2,
    "Restricted maneuverability" : 3,
    "Constrained by her draught" : 4,
    "Moored" : 5,
    "Aground" : 6,
    "Engaged in Fishing" : 7,
    "Under way sailing" : 8,
    "Hazardous material - High Speed" : 9,
    "Hazardous material - Wing in Ground" : 10,
    "Power-driven vessel towing astern" : 11,
    "Power-driven vessel pushing ahead or towing alongside" : 12,
    "AIS-SART" : 14,
}
def lookup_encode_NAV_STATUS(value):
    result = lookup_dict_encode_NAV_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from NAV_STATUS")
    return result

lookup_dict_POWER_FACTOR = {
    0: "Leading",
    1: "Lagging",
    2: "Error",
}
def lookup_POWER_FACTOR(value):
    return lookup_dict_POWER_FACTOR.get(value, "Unknown")

lookup_dict_encode_POWER_FACTOR = {
    "Leading" : 0,
    "Lagging" : 1,
    "Error" : 2,
}
def lookup_encode_POWER_FACTOR(value):
    result = lookup_dict_encode_POWER_FACTOR.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from POWER_FACTOR")
    return result

lookup_dict_TEMPERATURE_SOURCE = {
    0: "Sea Temperature",
    1: "Outside Temperature",
    2: "Inside Temperature",
    3: "Engine Room Temperature",
    4: "Main Cabin Temperature",
    5: "Live Well Temperature",
    6: "Bait Well Temperature",
    7: "Refrigeration Temperature",
    8: "Heating System Temperature",
    9: "Dew Point Temperature",
    10: "Apparent Wind Chill Temperature",
    11: "Theoretical Wind Chill Temperature",
    12: "Heat Index Temperature",
    13: "Freezer Temperature",
    14: "Exhaust Gas Temperature",
    15: "Shaft Seal Temperature",
}
def lookup_TEMPERATURE_SOURCE(value):
    return lookup_dict_TEMPERATURE_SOURCE.get(value, "Unknown")

lookup_dict_encode_TEMPERATURE_SOURCE = {
    "Sea Temperature" : 0,
    "Outside Temperature" : 1,
    "Inside Temperature" : 2,
    "Engine Room Temperature" : 3,
    "Main Cabin Temperature" : 4,
    "Live Well Temperature" : 5,
    "Bait Well Temperature" : 6,
    "Refrigeration Temperature" : 7,
    "Heating System Temperature" : 8,
    "Dew Point Temperature" : 9,
    "Apparent Wind Chill Temperature" : 10,
    "Theoretical Wind Chill Temperature" : 11,
    "Heat Index Temperature" : 12,
    "Freezer Temperature" : 13,
    "Exhaust Gas Temperature" : 14,
    "Shaft Seal Temperature" : 15,
}
def lookup_encode_TEMPERATURE_SOURCE(value):
    result = lookup_dict_encode_TEMPERATURE_SOURCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from TEMPERATURE_SOURCE")
    return result

lookup_dict_HUMIDITY_SOURCE = {
    0: "Inside",
    1: "Outside",
}
def lookup_HUMIDITY_SOURCE(value):
    return lookup_dict_HUMIDITY_SOURCE.get(value, "Unknown")

lookup_dict_encode_HUMIDITY_SOURCE = {
    "Inside" : 0,
    "Outside" : 1,
}
def lookup_encode_HUMIDITY_SOURCE(value):
    result = lookup_dict_encode_HUMIDITY_SOURCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from HUMIDITY_SOURCE")
    return result

lookup_dict_PRESSURE_SOURCE = {
    0: "Atmospheric",
    1: "Water",
    2: "Steam",
    3: "Compressed Air",
    4: "Hydraulic",
    5: "Filter",
    6: "AltimeterSetting",
    7: "Oil",
    8: "Fuel",
}
def lookup_PRESSURE_SOURCE(value):
    return lookup_dict_PRESSURE_SOURCE.get(value, "Unknown")

lookup_dict_encode_PRESSURE_SOURCE = {
    "Atmospheric" : 0,
    "Water" : 1,
    "Steam" : 2,
    "Compressed Air" : 3,
    "Hydraulic" : 4,
    "Filter" : 5,
    "AltimeterSetting" : 6,
    "Oil" : 7,
    "Fuel" : 8,
}
def lookup_encode_PRESSURE_SOURCE(value):
    result = lookup_dict_encode_PRESSURE_SOURCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from PRESSURE_SOURCE")
    return result

lookup_dict_DSC_FORMAT = {
    102: "Geographical area",
    112: "Distress",
    114: "Common interest",
    116: "All ships",
    120: "Individual stations",
    121: "Non-calling purpose",
    123: "Individual station automatic",
}
def lookup_DSC_FORMAT(value):
    return lookup_dict_DSC_FORMAT.get(value, "Unknown")

lookup_dict_encode_DSC_FORMAT = {
    "Geographical area" : 102,
    "Distress" : 112,
    "Common interest" : 114,
    "All ships" : 116,
    "Individual stations" : 120,
    "Non-calling purpose" : 121,
    "Individual station automatic" : 123,
}
def lookup_encode_DSC_FORMAT(value):
    result = lookup_dict_encode_DSC_FORMAT.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DSC_FORMAT")
    return result

lookup_dict_DSC_CATEGORY = {
    100: "Routine",
    108: "Safety",
    110: "Urgency",
    112: "Distress",
}
def lookup_DSC_CATEGORY(value):
    return lookup_dict_DSC_CATEGORY.get(value, "Unknown")

lookup_dict_encode_DSC_CATEGORY = {
    "Routine" : 100,
    "Safety" : 108,
    "Urgency" : 110,
    "Distress" : 112,
}
def lookup_encode_DSC_CATEGORY(value):
    result = lookup_dict_encode_DSC_CATEGORY.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DSC_CATEGORY")
    return result

lookup_dict_DSC_NATURE = {
    100: "Fire",
    101: "Flooding",
    102: "Collision",
    103: "Grounding",
    104: "Listing",
    105: "Sinking",
    106: "Disabled and adrift",
    107: "Undesignated",
    108: "Abandoning ship",
    109: "Piracy",
    110: "Man overboard",
    112: "EPIRB emission",
}
def lookup_DSC_NATURE(value):
    return lookup_dict_DSC_NATURE.get(value, "Unknown")

lookup_dict_encode_DSC_NATURE = {
    "Fire" : 100,
    "Flooding" : 101,
    "Collision" : 102,
    "Grounding" : 103,
    "Listing" : 104,
    "Sinking" : 105,
    "Disabled and adrift" : 106,
    "Undesignated" : 107,
    "Abandoning ship" : 108,
    "Piracy" : 109,
    "Man overboard" : 110,
    "EPIRB emission" : 112,
}
def lookup_encode_DSC_NATURE(value):
    result = lookup_dict_encode_DSC_NATURE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DSC_NATURE")
    return result

lookup_dict_DSC_FIRST_TELECOMMAND = {
    100: "F3E/G3E All modes TP",
    101: "F3E/G3E duplex TP",
    103: "Polling",
    104: "Unable to comply",
    105: "End of call",
    106: "Data",
    109: "J3E TP",
    110: "Distress acknowledgement",
    112: "Distress relay",
    113: "F1B/J2B TTY-FEC",
    115: "F1B/J2B TTY-ARQ",
    118: "Test",
    121: "Ship position or location registration updating",
    126: "No information",
}
def lookup_DSC_FIRST_TELECOMMAND(value):
    return lookup_dict_DSC_FIRST_TELECOMMAND.get(value, "Unknown")

lookup_dict_encode_DSC_FIRST_TELECOMMAND = {
    "F3E/G3E All modes TP" : 100,
    "F3E/G3E duplex TP" : 101,
    "Polling" : 103,
    "Unable to comply" : 104,
    "End of call" : 105,
    "Data" : 106,
    "J3E TP" : 109,
    "Distress acknowledgement" : 110,
    "Distress relay" : 112,
    "F1B/J2B TTY-FEC" : 113,
    "F1B/J2B TTY-ARQ" : 115,
    "Test" : 118,
    "Ship position or location registration updating" : 121,
    "No information" : 126,
}
def lookup_encode_DSC_FIRST_TELECOMMAND(value):
    result = lookup_dict_encode_DSC_FIRST_TELECOMMAND.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DSC_FIRST_TELECOMMAND")
    return result

lookup_dict_DSC_SECOND_TELECOMMAND = {
    100: "No reason given",
    101: "Congestion at MSC",
    102: "Busy",
    103: "Queue indication",
    104: "Station barred",
    105: "No operator available",
    106: "Operator temporarily unavailable",
    107: "Equipment disabled",
    108: "Unable to use proposed channel",
    109: "Unable to use proposed mode",
    110: "Ships and aircraft of States not parties to an armed conflict",
    111: "Medical transports",
    112: "Pay phone/public call office",
    113: "Fax/data",
    126: "No information",
}
def lookup_DSC_SECOND_TELECOMMAND(value):
    return lookup_dict_DSC_SECOND_TELECOMMAND.get(value, "Unknown")

lookup_dict_encode_DSC_SECOND_TELECOMMAND = {
    "No reason given" : 100,
    "Congestion at MSC" : 101,
    "Busy" : 102,
    "Queue indication" : 103,
    "Station barred" : 104,
    "No operator available" : 105,
    "Operator temporarily unavailable" : 106,
    "Equipment disabled" : 107,
    "Unable to use proposed channel" : 108,
    "Unable to use proposed mode" : 109,
    "Ships and aircraft of States not parties to an armed conflict" : 110,
    "Medical transports" : 111,
    "Pay phone/public call office" : 112,
    "Fax/data" : 113,
    "No information" : 126,
}
def lookup_encode_DSC_SECOND_TELECOMMAND(value):
    result = lookup_dict_encode_DSC_SECOND_TELECOMMAND.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DSC_SECOND_TELECOMMAND")
    return result

lookup_dict_DSC_EXPANSION_DATA = {
    100: "Enhanced position",
    101: "Source and datum of position",
    102: "SOG",
    103: "COG",
    104: "Additional station identification",
    105: "Enhanced geographic area",
    106: "Number of persons on board",
}
def lookup_DSC_EXPANSION_DATA(value):
    return lookup_dict_DSC_EXPANSION_DATA.get(value, "Unknown")

lookup_dict_encode_DSC_EXPANSION_DATA = {
    "Enhanced position" : 100,
    "Source and datum of position" : 101,
    "SOG" : 102,
    "COG" : 103,
    "Additional station identification" : 104,
    "Enhanced geographic area" : 105,
    "Number of persons on board" : 106,
}
def lookup_encode_DSC_EXPANSION_DATA(value):
    result = lookup_dict_encode_DSC_EXPANSION_DATA.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DSC_EXPANSION_DATA")
    return result

lookup_dict_SEATALK_ALARM_STATUS = {
    0: "Alarm condition not met",
    1: "Alarm condition met and not silenced",
    2: "Alarm condition met and silenced",
}
def lookup_SEATALK_ALARM_STATUS(value):
    return lookup_dict_SEATALK_ALARM_STATUS.get(value, "Unknown")

lookup_dict_encode_SEATALK_ALARM_STATUS = {
    "Alarm condition not met" : 0,
    "Alarm condition met and not silenced" : 1,
    "Alarm condition met and silenced" : 2,
}
def lookup_encode_SEATALK_ALARM_STATUS(value):
    result = lookup_dict_encode_SEATALK_ALARM_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SEATALK_ALARM_STATUS")
    return result

lookup_dict_SEATALK_ALARM_ID = {
    0: "No Alarm",
    1: "Shallow Depth",
    2: "Deep Depth",
    3: "Shallow Anchor",
    4: "Deep Anchor",
    5: "Off Course",
    6: "AWA High",
    7: "AWA Low",
    8: "AWS High",
    9: "AWS Low",
    10: "TWA High",
    11: "TWA Low",
    12: "TWS High",
    13: "TWS Low",
    14: "WP Arrival",
    15: "Boat Speed High",
    16: "Boat Speed Low",
    17: "Sea Temperature High",
    18: "Sea Temperature Low",
    19: "Pilot Watch",
    20: "Pilot Off Course",
    21: "Pilot Wind Shift",
    22: "Pilot Low Battery",
    23: "Pilot Last Minute Of Watch",
    24: "Pilot No NMEA Data",
    25: "Pilot Large XTE",
    26: "Pilot NMEA DataError",
    27: "Pilot CU Disconnected",
    28: "Pilot Auto Release",
    29: "Pilot Way Point Advance",
    30: "Pilot Drive Stopped",
    31: "Pilot Type Unspecified",
    32: "Pilot Calibration Required",
    33: "Pilot Last Heading",
    34: "Pilot No Pilot",
    35: "Pilot Route Complete",
    36: "Pilot Variable Text",
    37: "GPS Failure",
    38: "MOB",
    39: "Seatalk1 Anchor",
    40: "Pilot Swapped Motor Power",
    41: "Pilot Standby Too Fast To Fish",
    42: "Pilot No GPS Fix",
    43: "Pilot No GPS COG",
    44: "Pilot Start Up",
    45: "Pilot Too Slow",
    46: "Pilot No Compass",
    47: "Pilot Rate Gyro Fault",
    48: "Pilot Current Limit",
    49: "Pilot Way Point Advance Port",
    50: "Pilot Way Point Advance Stbd",
    51: "Pilot No Wind Data",
    52: "Pilot No Speed Data",
    53: "Pilot Seatalk Fail1",
    54: "Pilot Seatalk Fail2",
    55: "Pilot Warning Too Fast To Fish",
    56: "Pilot Auto Dockside Fail",
    57: "Pilot Turn Too Fast",
    58: "Pilot No Nav Data",
    59: "Pilot Lost Waypoint Data",
    60: "Pilot EEPROM Corrupt",
    61: "Pilot Rudder Feedback Fail",
    62: "Pilot Autolearn Fail1",
    63: "Pilot Autolearn Fail2",
    64: "Pilot Autolearn Fail3",
    65: "Pilot Autolearn Fail4",
    66: "Pilot Autolearn Fail5",
    67: "Pilot Autolearn Fail6",
    68: "Pilot Warning Cal Required",
    69: "Pilot Warning OffCourse",
    70: "Pilot Warning XTE",
    71: "Pilot Warning Wind Shift",
    72: "Pilot Warning Drive Short",
    73: "Pilot Warning Clutch Short",
    74: "Pilot Warning Solenoid Short",
    75: "Pilot Joystick Fault",
    76: "Pilot No Joystick Data",
    80: "Pilot Invalid Command",
    81: "AIS TX Malfunction",
    82: "AIS Antenna VSWR fault",
    83: "AIS Rx channel 1 malfunction",
    84: "AIS Rx channel 2 malfunction",
    85: "AIS No sensor position in use",
    86: "AIS No valid SOG information",
    87: "AIS No valid COG information",
    88: "AIS 12V alarm",
    89: "AIS 6V alarm",
    90: "AIS Noise threshold exceeded channel A",
    91: "AIS Noise threshold exceeded channel B",
    92: "AIS Transmitter PA fault",
    93: "AIS 3V3 alarm",
    94: "AIS Rx channel 70 malfunction",
    95: "AIS Heading lost/invalid",
    96: "AIS internal GPS lost",
    97: "AIS No sensor position",
    98: "AIS Lock failure",
    99: "AIS Internal GGA timeout",
    100: "AIS Protocol stack restart",
    101: "Pilot No IPS communications",
    102: "Pilot Power-On or Sleep-Switch Reset While Engaged",
    103: "Pilot Unexpected Reset While Engaged",
    104: "AIS Dangerous Target",
    105: "AIS Lost Target",
    106: "AIS Safety Related Message (used to silence)",
    107: "AIS Connection Lost",
    108: "No Fix",
}
def lookup_SEATALK_ALARM_ID(value):
    return lookup_dict_SEATALK_ALARM_ID.get(value, "Unknown")

lookup_dict_encode_SEATALK_ALARM_ID = {
    "No Alarm" : 0,
    "Shallow Depth" : 1,
    "Deep Depth" : 2,
    "Shallow Anchor" : 3,
    "Deep Anchor" : 4,
    "Off Course" : 5,
    "AWA High" : 6,
    "AWA Low" : 7,
    "AWS High" : 8,
    "AWS Low" : 9,
    "TWA High" : 10,
    "TWA Low" : 11,
    "TWS High" : 12,
    "TWS Low" : 13,
    "WP Arrival" : 14,
    "Boat Speed High" : 15,
    "Boat Speed Low" : 16,
    "Sea Temperature High" : 17,
    "Sea Temperature Low" : 18,
    "Pilot Watch" : 19,
    "Pilot Off Course" : 20,
    "Pilot Wind Shift" : 21,
    "Pilot Low Battery" : 22,
    "Pilot Last Minute Of Watch" : 23,
    "Pilot No NMEA Data" : 24,
    "Pilot Large XTE" : 25,
    "Pilot NMEA DataError" : 26,
    "Pilot CU Disconnected" : 27,
    "Pilot Auto Release" : 28,
    "Pilot Way Point Advance" : 29,
    "Pilot Drive Stopped" : 30,
    "Pilot Type Unspecified" : 31,
    "Pilot Calibration Required" : 32,
    "Pilot Last Heading" : 33,
    "Pilot No Pilot" : 34,
    "Pilot Route Complete" : 35,
    "Pilot Variable Text" : 36,
    "GPS Failure" : 37,
    "MOB" : 38,
    "Seatalk1 Anchor" : 39,
    "Pilot Swapped Motor Power" : 40,
    "Pilot Standby Too Fast To Fish" : 41,
    "Pilot No GPS Fix" : 42,
    "Pilot No GPS COG" : 43,
    "Pilot Start Up" : 44,
    "Pilot Too Slow" : 45,
    "Pilot No Compass" : 46,
    "Pilot Rate Gyro Fault" : 47,
    "Pilot Current Limit" : 48,
    "Pilot Way Point Advance Port" : 49,
    "Pilot Way Point Advance Stbd" : 50,
    "Pilot No Wind Data" : 51,
    "Pilot No Speed Data" : 52,
    "Pilot Seatalk Fail1" : 53,
    "Pilot Seatalk Fail2" : 54,
    "Pilot Warning Too Fast To Fish" : 55,
    "Pilot Auto Dockside Fail" : 56,
    "Pilot Turn Too Fast" : 57,
    "Pilot No Nav Data" : 58,
    "Pilot Lost Waypoint Data" : 59,
    "Pilot EEPROM Corrupt" : 60,
    "Pilot Rudder Feedback Fail" : 61,
    "Pilot Autolearn Fail1" : 62,
    "Pilot Autolearn Fail2" : 63,
    "Pilot Autolearn Fail3" : 64,
    "Pilot Autolearn Fail4" : 65,
    "Pilot Autolearn Fail5" : 66,
    "Pilot Autolearn Fail6" : 67,
    "Pilot Warning Cal Required" : 68,
    "Pilot Warning OffCourse" : 69,
    "Pilot Warning XTE" : 70,
    "Pilot Warning Wind Shift" : 71,
    "Pilot Warning Drive Short" : 72,
    "Pilot Warning Clutch Short" : 73,
    "Pilot Warning Solenoid Short" : 74,
    "Pilot Joystick Fault" : 75,
    "Pilot No Joystick Data" : 76,
    "Pilot Invalid Command" : 80,
    "AIS TX Malfunction" : 81,
    "AIS Antenna VSWR fault" : 82,
    "AIS Rx channel 1 malfunction" : 83,
    "AIS Rx channel 2 malfunction" : 84,
    "AIS No sensor position in use" : 85,
    "AIS No valid SOG information" : 86,
    "AIS No valid COG information" : 87,
    "AIS 12V alarm" : 88,
    "AIS 6V alarm" : 89,
    "AIS Noise threshold exceeded channel A" : 90,
    "AIS Noise threshold exceeded channel B" : 91,
    "AIS Transmitter PA fault" : 92,
    "AIS 3V3 alarm" : 93,
    "AIS Rx channel 70 malfunction" : 94,
    "AIS Heading lost/invalid" : 95,
    "AIS internal GPS lost" : 96,
    "AIS No sensor position" : 97,
    "AIS Lock failure" : 98,
    "AIS Internal GGA timeout" : 99,
    "AIS Protocol stack restart" : 100,
    "Pilot No IPS communications" : 101,
    "Pilot Power-On or Sleep-Switch Reset While Engaged" : 102,
    "Pilot Unexpected Reset While Engaged" : 103,
    "AIS Dangerous Target" : 104,
    "AIS Lost Target" : 105,
    "AIS Safety Related Message (used to silence)" : 106,
    "AIS Connection Lost" : 107,
    "No Fix" : 108,
}
def lookup_encode_SEATALK_ALARM_ID(value):
    result = lookup_dict_encode_SEATALK_ALARM_ID.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SEATALK_ALARM_ID")
    return result

lookup_dict_SEATALK_ALARM_GROUP = {
    0: "Instrument",
    1: "Autopilot",
    2: "Radar",
    3: "Chart Plotter",
    4: "AIS",
}
def lookup_SEATALK_ALARM_GROUP(value):
    return lookup_dict_SEATALK_ALARM_GROUP.get(value, "Unknown")

lookup_dict_encode_SEATALK_ALARM_GROUP = {
    "Instrument" : 0,
    "Autopilot" : 1,
    "Radar" : 2,
    "Chart Plotter" : 3,
    "AIS" : 4,
}
def lookup_encode_SEATALK_ALARM_GROUP(value):
    result = lookup_dict_encode_SEATALK_ALARM_GROUP.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SEATALK_ALARM_GROUP")
    return result

lookup_dict_SEATALK_PILOT_MODE = {
    64: "Standby",
    66: "Auto",
    70: "Wind",
    74: "Track",
}
def lookup_SEATALK_PILOT_MODE(value):
    return lookup_dict_SEATALK_PILOT_MODE.get(value, "Unknown")

lookup_dict_encode_SEATALK_PILOT_MODE = {
    "Standby" : 64,
    "Auto" : 66,
    "Wind" : 70,
    "Track" : 74,
}
def lookup_encode_SEATALK_PILOT_MODE(value):
    result = lookup_dict_encode_SEATALK_PILOT_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SEATALK_PILOT_MODE")
    return result

lookup_dict_ENTERTAINMENT_ZONE = {
    0: "All zones",
    1: "Zone 1",
    2: "Zone 2",
    3: "Zone 3",
    4: "Zone 4",
}
def lookup_ENTERTAINMENT_ZONE(value):
    return lookup_dict_ENTERTAINMENT_ZONE.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_ZONE = {
    "All zones" : 0,
    "Zone 1" : 1,
    "Zone 2" : 2,
    "Zone 3" : 3,
    "Zone 4" : 4,
}
def lookup_encode_ENTERTAINMENT_ZONE(value):
    result = lookup_dict_encode_ENTERTAINMENT_ZONE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_ZONE")
    return result

lookup_dict_ENTERTAINMENT_SOURCE = {
    0: "Vessel alarm",
    1: "AM",
    2: "FM",
    3: "Weather",
    4: "DAB",
    5: "Aux",
    6: "USB",
    7: "CD",
    8: "MP3",
    9: "Apple iOS",
    10: "Android",
    11: "Bluetooth",
    12: "Sirius XM",
    13: "Pandora",
    14: "Spotify",
    15: "Slacker",
    16: "Songza",
    17: "Apple Radio",
    18: "Last FM",
    19: "Ethernet",
    20: "Video MP4",
    21: "Video DVD",
    22: "Video BluRay",
    23: "HDMI",
    24: "Video",
}
def lookup_ENTERTAINMENT_SOURCE(value):
    return lookup_dict_ENTERTAINMENT_SOURCE.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_SOURCE = {
    "Vessel alarm" : 0,
    "AM" : 1,
    "FM" : 2,
    "Weather" : 3,
    "DAB" : 4,
    "Aux" : 5,
    "USB" : 6,
    "CD" : 7,
    "MP3" : 8,
    "Apple iOS" : 9,
    "Android" : 10,
    "Bluetooth" : 11,
    "Sirius XM" : 12,
    "Pandora" : 13,
    "Spotify" : 14,
    "Slacker" : 15,
    "Songza" : 16,
    "Apple Radio" : 17,
    "Last FM" : 18,
    "Ethernet" : 19,
    "Video MP4" : 20,
    "Video DVD" : 21,
    "Video BluRay" : 22,
    "HDMI" : 23,
    "Video" : 24,
}
def lookup_encode_ENTERTAINMENT_SOURCE(value):
    result = lookup_dict_encode_ENTERTAINMENT_SOURCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_SOURCE")
    return result

lookup_dict_ENTERTAINMENT_PLAY_STATUS = {
    0: "Play",
    1: "Pause",
    2: "Stop",
    3: "FF 1x",
    4: "FF 2x",
    5: "FF 3x",
    6: "FF 4x",
    7: "RW 1x",
    8: "RW 2x",
    9: "RW 3x",
    10: "RW 4x",
    11: "Skip ahead",
    12: "Skip back",
    13: "Jog ahead",
    14: "Jog back",
    15: "Seek up",
    16: "Seek down",
    17: "Scan up",
    18: "Scan down",
    19: "Tune up",
    20: "Tune down",
    21: "Slow motion .75x",
    22: "Slow motion .5x",
    23: "Slow motion .25x",
    24: "Slow motion .125x",
}
def lookup_ENTERTAINMENT_PLAY_STATUS(value):
    return lookup_dict_ENTERTAINMENT_PLAY_STATUS.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_PLAY_STATUS = {
    "Play" : 0,
    "Pause" : 1,
    "Stop" : 2,
    "FF 1x" : 3,
    "FF 2x" : 4,
    "FF 3x" : 5,
    "FF 4x" : 6,
    "RW 1x" : 7,
    "RW 2x" : 8,
    "RW 3x" : 9,
    "RW 4x" : 10,
    "Skip ahead" : 11,
    "Skip back" : 12,
    "Jog ahead" : 13,
    "Jog back" : 14,
    "Seek up" : 15,
    "Seek down" : 16,
    "Scan up" : 17,
    "Scan down" : 18,
    "Tune up" : 19,
    "Tune down" : 20,
    "Slow motion .75x" : 21,
    "Slow motion .5x" : 22,
    "Slow motion .25x" : 23,
    "Slow motion .125x" : 24,
}
def lookup_encode_ENTERTAINMENT_PLAY_STATUS(value):
    result = lookup_dict_encode_ENTERTAINMENT_PLAY_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_PLAY_STATUS")
    return result

lookup_dict_ENTERTAINMENT_REPEAT_STATUS = {
    0: "Off",
    1: "One",
    2: "All",
}
def lookup_ENTERTAINMENT_REPEAT_STATUS(value):
    return lookup_dict_ENTERTAINMENT_REPEAT_STATUS.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_REPEAT_STATUS = {
    "Off" : 0,
    "One" : 1,
    "All" : 2,
}
def lookup_encode_ENTERTAINMENT_REPEAT_STATUS(value):
    result = lookup_dict_encode_ENTERTAINMENT_REPEAT_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_REPEAT_STATUS")
    return result

lookup_dict_ENTERTAINMENT_SHUFFLE_STATUS = {
    0: "Off",
    1: "Play queue",
    2: "All",
}
def lookup_ENTERTAINMENT_SHUFFLE_STATUS(value):
    return lookup_dict_ENTERTAINMENT_SHUFFLE_STATUS.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_SHUFFLE_STATUS = {
    "Off" : 0,
    "Play queue" : 1,
    "All" : 2,
}
def lookup_encode_ENTERTAINMENT_SHUFFLE_STATUS(value):
    result = lookup_dict_encode_ENTERTAINMENT_SHUFFLE_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_SHUFFLE_STATUS")
    return result

lookup_dict_ENTERTAINMENT_LIKE_STATUS = {
    0: "None",
    1: "Thumbs up",
    2: "Thumbs down",
}
def lookup_ENTERTAINMENT_LIKE_STATUS(value):
    return lookup_dict_ENTERTAINMENT_LIKE_STATUS.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_LIKE_STATUS = {
    "None" : 0,
    "Thumbs up" : 1,
    "Thumbs down" : 2,
}
def lookup_encode_ENTERTAINMENT_LIKE_STATUS(value):
    result = lookup_dict_encode_ENTERTAINMENT_LIKE_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_LIKE_STATUS")
    return result

lookup_dict_ENTERTAINMENT_TYPE = {
    0: "File",
    1: "Playlist Name",
    2: "Genre Name",
    3: "Album Name",
    4: "Artist Name",
    5: "Track Name",
    6: "Station Name",
    7: "Station Number",
    8: "Favourite Number",
    9: "Play Queue",
    10: "Content Info",
}
def lookup_ENTERTAINMENT_TYPE(value):
    return lookup_dict_ENTERTAINMENT_TYPE.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_TYPE = {
    "File" : 0,
    "Playlist Name" : 1,
    "Genre Name" : 2,
    "Album Name" : 3,
    "Artist Name" : 4,
    "Track Name" : 5,
    "Station Name" : 6,
    "Station Number" : 7,
    "Favourite Number" : 8,
    "Play Queue" : 9,
    "Content Info" : 10,
}
def lookup_encode_ENTERTAINMENT_TYPE(value):
    result = lookup_dict_encode_ENTERTAINMENT_TYPE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_TYPE")
    return result

lookup_dict_ENTERTAINMENT_GROUP = {
    0: "File",
    1: "Playlist Name",
    2: "Genre Name",
    3: "Album Name",
    4: "Artist Name",
    5: "Track Name",
    6: "Station Name",
    7: "Station Number",
    8: "Favourite Number",
    9: "Play Queue",
    10: "Content Info",
}
def lookup_ENTERTAINMENT_GROUP(value):
    return lookup_dict_ENTERTAINMENT_GROUP.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_GROUP = {
    "File" : 0,
    "Playlist Name" : 1,
    "Genre Name" : 2,
    "Album Name" : 3,
    "Artist Name" : 4,
    "Track Name" : 5,
    "Station Name" : 6,
    "Station Number" : 7,
    "Favourite Number" : 8,
    "Play Queue" : 9,
    "Content Info" : 10,
}
def lookup_encode_ENTERTAINMENT_GROUP(value):
    result = lookup_dict_encode_ENTERTAINMENT_GROUP.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_GROUP")
    return result

lookup_dict_ENTERTAINMENT_CHANNEL = {
    0: "All channels",
    1: "Stereo full range",
    2: "Stereo front",
    3: "Stereo back",
    4: "Stereo surround",
    5: "Center",
    6: "Subwoofer",
    7: "Front left",
    8: "Front right",
    9: "Back left",
    10: "Back right",
    11: "Surround left",
    12: "Surround right",
}
def lookup_ENTERTAINMENT_CHANNEL(value):
    return lookup_dict_ENTERTAINMENT_CHANNEL.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_CHANNEL = {
    "All channels" : 0,
    "Stereo full range" : 1,
    "Stereo front" : 2,
    "Stereo back" : 3,
    "Stereo surround" : 4,
    "Center" : 5,
    "Subwoofer" : 6,
    "Front left" : 7,
    "Front right" : 8,
    "Back left" : 9,
    "Back right" : 10,
    "Surround left" : 11,
    "Surround right" : 12,
}
def lookup_encode_ENTERTAINMENT_CHANNEL(value):
    result = lookup_dict_encode_ENTERTAINMENT_CHANNEL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_CHANNEL")
    return result

lookup_dict_ENTERTAINMENT_EQ = {
    0: "Flat",
    1: "Rock",
    2: "Hall",
    3: "Jazz",
    4: "Pop",
    5: "Live",
    6: "Classic",
    7: "Vocal",
    8: "Arena",
    9: "Cinema",
    10: "Custom",
}
def lookup_ENTERTAINMENT_EQ(value):
    return lookup_dict_ENTERTAINMENT_EQ.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_EQ = {
    "Flat" : 0,
    "Rock" : 1,
    "Hall" : 2,
    "Jazz" : 3,
    "Pop" : 4,
    "Live" : 5,
    "Classic" : 6,
    "Vocal" : 7,
    "Arena" : 8,
    "Cinema" : 9,
    "Custom" : 10,
}
def lookup_encode_ENTERTAINMENT_EQ(value):
    result = lookup_dict_encode_ENTERTAINMENT_EQ.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_EQ")
    return result

lookup_dict_ENTERTAINMENT_FILTER = {
    0: "Full range",
    1: "High pass",
    2: "Low pass",
    3: "Band pass",
    4: "Notch filter",
}
def lookup_ENTERTAINMENT_FILTER(value):
    return lookup_dict_ENTERTAINMENT_FILTER.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_FILTER = {
    "Full range" : 0,
    "High pass" : 1,
    "Low pass" : 2,
    "Band pass" : 3,
    "Notch filter" : 4,
}
def lookup_encode_ENTERTAINMENT_FILTER(value):
    result = lookup_dict_encode_ENTERTAINMENT_FILTER.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_FILTER")
    return result

lookup_dict_ALERT_TYPE = {
    1: "Emergency Alarm",
    2: "Alarm",
    5: "Warning",
    8: "Caution",
}
def lookup_ALERT_TYPE(value):
    return lookup_dict_ALERT_TYPE.get(value, "Unknown")

lookup_dict_encode_ALERT_TYPE = {
    "Emergency Alarm" : 1,
    "Alarm" : 2,
    "Warning" : 5,
    "Caution" : 8,
}
def lookup_encode_ALERT_TYPE(value):
    result = lookup_dict_encode_ALERT_TYPE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ALERT_TYPE")
    return result

lookup_dict_ALERT_CATEGORY = {
    0: "Navigational",
    1: "Technical",
}
def lookup_ALERT_CATEGORY(value):
    return lookup_dict_ALERT_CATEGORY.get(value, "Unknown")

lookup_dict_encode_ALERT_CATEGORY = {
    "Navigational" : 0,
    "Technical" : 1,
}
def lookup_encode_ALERT_CATEGORY(value):
    result = lookup_dict_encode_ALERT_CATEGORY.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ALERT_CATEGORY")
    return result

lookup_dict_ALERT_TRIGGER_CONDITION = {
    0: "Manual",
    1: "Auto",
    2: "Test",
    3: "Disabled",
}
def lookup_ALERT_TRIGGER_CONDITION(value):
    return lookup_dict_ALERT_TRIGGER_CONDITION.get(value, "Unknown")

lookup_dict_encode_ALERT_TRIGGER_CONDITION = {
    "Manual" : 0,
    "Auto" : 1,
    "Test" : 2,
    "Disabled" : 3,
}
def lookup_encode_ALERT_TRIGGER_CONDITION(value):
    result = lookup_dict_encode_ALERT_TRIGGER_CONDITION.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ALERT_TRIGGER_CONDITION")
    return result

lookup_dict_ALERT_THRESHOLD_STATUS = {
    0: "Normal",
    1: "Threshold Exceeded",
    2: "Extreme Threshold Exceeded",
    3: "Low Threshold Exceeded",
    4: "Acknowledged",
    5: "Awaiting Acknowledge",
}
def lookup_ALERT_THRESHOLD_STATUS(value):
    return lookup_dict_ALERT_THRESHOLD_STATUS.get(value, "Unknown")

lookup_dict_encode_ALERT_THRESHOLD_STATUS = {
    "Normal" : 0,
    "Threshold Exceeded" : 1,
    "Extreme Threshold Exceeded" : 2,
    "Low Threshold Exceeded" : 3,
    "Acknowledged" : 4,
    "Awaiting Acknowledge" : 5,
}
def lookup_encode_ALERT_THRESHOLD_STATUS(value):
    result = lookup_dict_encode_ALERT_THRESHOLD_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ALERT_THRESHOLD_STATUS")
    return result

lookup_dict_ALERT_STATE = {
    0: "Disabled",
    1: "Normal",
    2: "Active",
    3: "Silenced",
    4: "Acknowledged",
    5: "Awaiting Acknowledge",
}
def lookup_ALERT_STATE(value):
    return lookup_dict_ALERT_STATE.get(value, "Unknown")

lookup_dict_encode_ALERT_STATE = {
    "Disabled" : 0,
    "Normal" : 1,
    "Active" : 2,
    "Silenced" : 3,
    "Acknowledged" : 4,
    "Awaiting Acknowledge" : 5,
}
def lookup_encode_ALERT_STATE(value):
    result = lookup_dict_encode_ALERT_STATE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ALERT_STATE")
    return result

lookup_dict_ALERT_LANGUAGE_ID = {
    0: "English (US)",
    1: "English (UK)",
    2: "Arabic",
    3: "Chinese (simplified)",
    4: "Croatian",
    5: "Danish",
    6: "Dutch",
    7: "Finnish",
    8: "French",
    9: "German",
    10: "Greek",
    11: "Italian",
    12: "Japanese",
    13: "Korean",
    14: "Norwegian",
    15: "Polish",
    16: "Portuguese",
    17: "Russian",
    18: "Spanish",
    19: "Swedish",
}
def lookup_ALERT_LANGUAGE_ID(value):
    return lookup_dict_ALERT_LANGUAGE_ID.get(value, "Unknown")

lookup_dict_encode_ALERT_LANGUAGE_ID = {
    "English (US)" : 0,
    "English (UK)" : 1,
    "Arabic" : 2,
    "Chinese (simplified)" : 3,
    "Croatian" : 4,
    "Danish" : 5,
    "Dutch" : 6,
    "Finnish" : 7,
    "French" : 8,
    "German" : 9,
    "Greek" : 10,
    "Italian" : 11,
    "Japanese" : 12,
    "Korean" : 13,
    "Norwegian" : 14,
    "Polish" : 15,
    "Portuguese" : 16,
    "Russian" : 17,
    "Spanish" : 18,
    "Swedish" : 19,
}
def lookup_encode_ALERT_LANGUAGE_ID(value):
    result = lookup_dict_encode_ALERT_LANGUAGE_ID.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ALERT_LANGUAGE_ID")
    return result

lookup_dict_ALERT_RESPONSE_COMMAND = {
    0: "Acknowledge",
    1: "Temporary Silence",
    2: "Test Command off",
    3: "Test Command on",
}
def lookup_ALERT_RESPONSE_COMMAND(value):
    return lookup_dict_ALERT_RESPONSE_COMMAND.get(value, "Unknown")

lookup_dict_encode_ALERT_RESPONSE_COMMAND = {
    "Acknowledge" : 0,
    "Temporary Silence" : 1,
    "Test Command off" : 2,
    "Test Command on" : 3,
}
def lookup_encode_ALERT_RESPONSE_COMMAND(value):
    result = lookup_dict_encode_ALERT_RESPONSE_COMMAND.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ALERT_RESPONSE_COMMAND")
    return result

lookup_dict_CONVERTER_STATE = {
    0: "Off",
    1: "Low Power Mode",
    2: "Fault",
    3: "Bulk",
    4: "Absorption",
    5: "Float",
    6: "Storage",
    7: "Equalize",
    8: "Pass thru",
    9: "Inverting",
    10: "Assisting",
}
def lookup_CONVERTER_STATE(value):
    return lookup_dict_CONVERTER_STATE.get(value, "Unknown")

lookup_dict_encode_CONVERTER_STATE = {
    "Off" : 0,
    "Low Power Mode" : 1,
    "Fault" : 2,
    "Bulk" : 3,
    "Absorption" : 4,
    "Float" : 5,
    "Storage" : 6,
    "Equalize" : 7,
    "Pass thru" : 8,
    "Inverting" : 9,
    "Assisting" : 10,
}
def lookup_encode_CONVERTER_STATE(value):
    result = lookup_dict_encode_CONVERTER_STATE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from CONVERTER_STATE")
    return result

lookup_dict_THRUSTER_DIRECTION_CONTROL = {
    0: "Off",
    1: "Ready",
    2: "To Port",
    3: "To Starboard",
}
def lookup_THRUSTER_DIRECTION_CONTROL(value):
    return lookup_dict_THRUSTER_DIRECTION_CONTROL.get(value, "Unknown")

lookup_dict_encode_THRUSTER_DIRECTION_CONTROL = {
    "Off" : 0,
    "Ready" : 1,
    "To Port" : 2,
    "To Starboard" : 3,
}
def lookup_encode_THRUSTER_DIRECTION_CONTROL(value):
    result = lookup_dict_encode_THRUSTER_DIRECTION_CONTROL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from THRUSTER_DIRECTION_CONTROL")
    return result

lookup_dict_THRUSTER_RETRACT_CONTROL = {
    0: "Off",
    1: "Extend",
    2: "Retract",
}
def lookup_THRUSTER_RETRACT_CONTROL(value):
    return lookup_dict_THRUSTER_RETRACT_CONTROL.get(value, "Unknown")

lookup_dict_encode_THRUSTER_RETRACT_CONTROL = {
    "Off" : 0,
    "Extend" : 1,
    "Retract" : 2,
}
def lookup_encode_THRUSTER_RETRACT_CONTROL(value):
    result = lookup_dict_encode_THRUSTER_RETRACT_CONTROL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from THRUSTER_RETRACT_CONTROL")
    return result

lookup_dict_THRUSTER_MOTOR_TYPE = {
    0: "12VDC",
    1: "24VDC",
    2: "48VDC",
    3: "24VAC",
    4: "Hydraulic",
}
def lookup_THRUSTER_MOTOR_TYPE(value):
    return lookup_dict_THRUSTER_MOTOR_TYPE.get(value, "Unknown")

lookup_dict_encode_THRUSTER_MOTOR_TYPE = {
    "12VDC" : 0,
    "24VDC" : 1,
    "48VDC" : 2,
    "24VAC" : 3,
    "Hydraulic" : 4,
}
def lookup_encode_THRUSTER_MOTOR_TYPE(value):
    result = lookup_dict_encode_THRUSTER_MOTOR_TYPE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from THRUSTER_MOTOR_TYPE")
    return result

lookup_dict_BOOT_STATE = {
    0: "in Startup Monitor",
    1: "running Bootloader",
    2: "running Application",
}
def lookup_BOOT_STATE(value):
    return lookup_dict_BOOT_STATE.get(value, "Unknown")

lookup_dict_encode_BOOT_STATE = {
    "in Startup Monitor" : 0,
    "running Bootloader" : 1,
    "running Application" : 2,
}
def lookup_encode_BOOT_STATE(value):
    result = lookup_dict_encode_BOOT_STATE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from BOOT_STATE")
    return result

lookup_dict_ACCESS_LEVEL = {
    0: "Locked",
    1: "unlocked level 1",
    2: "unlocked level 2",
}
def lookup_ACCESS_LEVEL(value):
    return lookup_dict_ACCESS_LEVEL.get(value, "Unknown")

lookup_dict_encode_ACCESS_LEVEL = {
    "Locked" : 0,
    "unlocked level 1" : 1,
    "unlocked level 2" : 2,
}
def lookup_encode_ACCESS_LEVEL(value):
    result = lookup_dict_encode_ACCESS_LEVEL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ACCESS_LEVEL")
    return result

lookup_dict_TRANSMISSION_INTERVAL = {
    0: "Acknowledge",
    1: "Transmit Interval/Priority not supported",
    2: "Transmit Interval too low",
    3: "Access denied",
    4: "Not supported",
}
def lookup_TRANSMISSION_INTERVAL(value):
    return lookup_dict_TRANSMISSION_INTERVAL.get(value, "Unknown")

lookup_dict_encode_TRANSMISSION_INTERVAL = {
    "Acknowledge" : 0,
    "Transmit Interval/Priority not supported" : 1,
    "Transmit Interval too low" : 2,
    "Access denied" : 3,
    "Not supported" : 4,
}
def lookup_encode_TRANSMISSION_INTERVAL(value):
    result = lookup_dict_encode_TRANSMISSION_INTERVAL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from TRANSMISSION_INTERVAL")
    return result

lookup_dict_PARAMETER_FIELD = {
    0: "Acknowledge",
    1: "Invalid parameter field",
    2: "Temporary error",
    3: "Parameter out of range",
    4: "Access denied",
    5: "Not supported",
    6: "Read or Write not supported",
}
def lookup_PARAMETER_FIELD(value):
    return lookup_dict_PARAMETER_FIELD.get(value, "Unknown")

lookup_dict_encode_PARAMETER_FIELD = {
    "Acknowledge" : 0,
    "Invalid parameter field" : 1,
    "Temporary error" : 2,
    "Parameter out of range" : 3,
    "Access denied" : 4,
    "Not supported" : 5,
    "Read or Write not supported" : 6,
}
def lookup_encode_PARAMETER_FIELD(value):
    result = lookup_dict_encode_PARAMETER_FIELD.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from PARAMETER_FIELD")
    return result

lookup_dict_PGN_LIST_FUNCTION = {
    0: "Transmit PGN list",
    1: "Receive PGN list",
}
def lookup_PGN_LIST_FUNCTION(value):
    return lookup_dict_PGN_LIST_FUNCTION.get(value, "Unknown")

lookup_dict_encode_PGN_LIST_FUNCTION = {
    "Transmit PGN list" : 0,
    "Receive PGN list" : 1,
}
def lookup_encode_PGN_LIST_FUNCTION(value):
    result = lookup_dict_encode_PGN_LIST_FUNCTION.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from PGN_LIST_FUNCTION")
    return result

lookup_dict_FUSION_COMMAND = {
    1: "Play",
    2: "Pause",
    4: "Next",
    6: "Prev",
}
def lookup_FUSION_COMMAND(value):
    return lookup_dict_FUSION_COMMAND.get(value, "Unknown")

lookup_dict_encode_FUSION_COMMAND = {
    "Play" : 1,
    "Pause" : 2,
    "Next" : 4,
    "Prev" : 6,
}
def lookup_encode_FUSION_COMMAND(value):
    result = lookup_dict_encode_FUSION_COMMAND.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from FUSION_COMMAND")
    return result

lookup_dict_FUSION_SIRIUS_COMMAND = {
    1: "Next",
    2: "Prev",
}
def lookup_FUSION_SIRIUS_COMMAND(value):
    return lookup_dict_FUSION_SIRIUS_COMMAND.get(value, "Unknown")

lookup_dict_encode_FUSION_SIRIUS_COMMAND = {
    "Next" : 1,
    "Prev" : 2,
}
def lookup_encode_FUSION_SIRIUS_COMMAND(value):
    result = lookup_dict_encode_FUSION_SIRIUS_COMMAND.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from FUSION_SIRIUS_COMMAND")
    return result

lookup_dict_FUSION_MUTE_COMMAND = {
    1: "Mute On",
    2: "Mute Off",
}
def lookup_FUSION_MUTE_COMMAND(value):
    return lookup_dict_FUSION_MUTE_COMMAND.get(value, "Unknown")

lookup_dict_encode_FUSION_MUTE_COMMAND = {
    "Mute On" : 1,
    "Mute Off" : 2,
}
def lookup_encode_FUSION_MUTE_COMMAND(value):
    result = lookup_dict_encode_FUSION_MUTE_COMMAND.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from FUSION_MUTE_COMMAND")
    return result

lookup_dict_SEATALK_KEYSTROKE = {
    1: "Auto",
    2: "Standby",
    3: "Wind",
    5: "-1",
    6: "-10",
    7: "+1",
    8: "+10",
    33: "-1 and -10",
    34: "+1 and +10",
    35: "Track",
}
def lookup_SEATALK_KEYSTROKE(value):
    return lookup_dict_SEATALK_KEYSTROKE.get(value, "Unknown")

lookup_dict_encode_SEATALK_KEYSTROKE = {
    "Auto" : 1,
    "Standby" : 2,
    "Wind" : 3,
    "-1" : 5,
    "-10" : 6,
    "+1" : 7,
    "+10" : 8,
    "-1 and -10" : 33,
    "+1 and +10" : 34,
    "Track" : 35,
}
def lookup_encode_SEATALK_KEYSTROKE(value):
    result = lookup_dict_encode_SEATALK_KEYSTROKE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SEATALK_KEYSTROKE")
    return result

lookup_dict_SEATALK_DEVICE_ID = {
    3: "S100",
    5: "Course Computer",
}
def lookup_SEATALK_DEVICE_ID(value):
    return lookup_dict_SEATALK_DEVICE_ID.get(value, "Unknown")

lookup_dict_encode_SEATALK_DEVICE_ID = {
    "S100" : 3,
    "Course Computer" : 5,
}
def lookup_encode_SEATALK_DEVICE_ID(value):
    result = lookup_dict_encode_SEATALK_DEVICE_ID.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SEATALK_DEVICE_ID")
    return result

lookup_dict_SEATALK_NETWORK_GROUP = {
    0: "None",
    1: "Helm 1",
    2: "Helm 2",
    3: "Cockpit",
    4: "Flybridge",
    5: "Mast",
    6: "Group 1",
    7: "Group 2",
    8: "Group 3",
    9: "Group 4",
    10: "Group 5",
}
def lookup_SEATALK_NETWORK_GROUP(value):
    return lookup_dict_SEATALK_NETWORK_GROUP.get(value, "Unknown")

lookup_dict_encode_SEATALK_NETWORK_GROUP = {
    "None" : 0,
    "Helm 1" : 1,
    "Helm 2" : 2,
    "Cockpit" : 3,
    "Flybridge" : 4,
    "Mast" : 5,
    "Group 1" : 6,
    "Group 2" : 7,
    "Group 3" : 8,
    "Group 4" : 9,
    "Group 5" : 10,
}
def lookup_encode_SEATALK_NETWORK_GROUP(value):
    result = lookup_dict_encode_SEATALK_NETWORK_GROUP.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SEATALK_NETWORK_GROUP")
    return result

lookup_dict_SEATALK_DISPLAY_COLOR = {
    0: "Day 1",
    2: "Day 2",
    3: "Red/Black",
    4: "Inverse",
}
def lookup_SEATALK_DISPLAY_COLOR(value):
    return lookup_dict_SEATALK_DISPLAY_COLOR.get(value, "Unknown")

lookup_dict_encode_SEATALK_DISPLAY_COLOR = {
    "Day 1" : 0,
    "Day 2" : 2,
    "Red/Black" : 3,
    "Inverse" : 4,
}
def lookup_encode_SEATALK_DISPLAY_COLOR(value):
    result = lookup_dict_encode_SEATALK_DISPLAY_COLOR.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SEATALK_DISPLAY_COLOR")
    return result

lookup_dict_AIRMAR_CALIBRATE_FUNCTION = {
    0: "Normal/cancel calibration",
    1: "Enter calibration mode",
    2: "Reset calibration to 0",
    3: "Verify",
    4: "Reset compass to defaults",
    5: "Reset damping to defaults",
}
def lookup_AIRMAR_CALIBRATE_FUNCTION(value):
    return lookup_dict_AIRMAR_CALIBRATE_FUNCTION.get(value, "Unknown")

lookup_dict_encode_AIRMAR_CALIBRATE_FUNCTION = {
    "Normal/cancel calibration" : 0,
    "Enter calibration mode" : 1,
    "Reset calibration to 0" : 2,
    "Verify" : 3,
    "Reset compass to defaults" : 4,
    "Reset damping to defaults" : 5,
}
def lookup_encode_AIRMAR_CALIBRATE_FUNCTION(value):
    result = lookup_dict_encode_AIRMAR_CALIBRATE_FUNCTION.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIRMAR_CALIBRATE_FUNCTION")
    return result

lookup_dict_AIRMAR_CALIBRATE_STATUS = {
    0: "Queried",
    1: "Passed",
    2: "Failed - timeout",
    3: "Failed - tilt error",
    4: "Failed - other",
    5: "In progress",
}
def lookup_AIRMAR_CALIBRATE_STATUS(value):
    return lookup_dict_AIRMAR_CALIBRATE_STATUS.get(value, "Unknown")

lookup_dict_encode_AIRMAR_CALIBRATE_STATUS = {
    "Queried" : 0,
    "Passed" : 1,
    "Failed - timeout" : 2,
    "Failed - tilt error" : 3,
    "Failed - other" : 4,
    "In progress" : 5,
}
def lookup_encode_AIRMAR_CALIBRATE_STATUS(value):
    result = lookup_dict_encode_AIRMAR_CALIBRATE_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIRMAR_CALIBRATE_STATUS")
    return result

lookup_dict_AIRMAR_TEMPERATURE_INSTANCE = {
    0: "Device Sensor",
    1: "Onboard Water Sensor",
    2: "Optional Water Sensor",
}
def lookup_AIRMAR_TEMPERATURE_INSTANCE(value):
    return lookup_dict_AIRMAR_TEMPERATURE_INSTANCE.get(value, "Unknown")

lookup_dict_encode_AIRMAR_TEMPERATURE_INSTANCE = {
    "Device Sensor" : 0,
    "Onboard Water Sensor" : 1,
    "Optional Water Sensor" : 2,
}
def lookup_encode_AIRMAR_TEMPERATURE_INSTANCE(value):
    result = lookup_dict_encode_AIRMAR_TEMPERATURE_INSTANCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIRMAR_TEMPERATURE_INSTANCE")
    return result

lookup_dict_AIRMAR_FILTER = {
    0: "No filter",
    1: "Basic IIR filter",
}
def lookup_AIRMAR_FILTER(value):
    return lookup_dict_AIRMAR_FILTER.get(value, "Unknown")

lookup_dict_encode_AIRMAR_FILTER = {
    "No filter" : 0,
    "Basic IIR filter" : 1,
}
def lookup_encode_AIRMAR_FILTER(value):
    result = lookup_dict_encode_AIRMAR_FILTER.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIRMAR_FILTER")
    return result

lookup_dict_CONTROLLER_STATE = {
    0: "Error Active",
    1: "Error Passive",
    2: "Bus Off",
}
def lookup_CONTROLLER_STATE(value):
    return lookup_dict_CONTROLLER_STATE.get(value, "Unknown")

lookup_dict_encode_CONTROLLER_STATE = {
    "Error Active" : 0,
    "Error Passive" : 1,
    "Bus Off" : 2,
}
def lookup_encode_CONTROLLER_STATE(value):
    result = lookup_dict_encode_CONTROLLER_STATE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from CONTROLLER_STATE")
    return result

lookup_dict_EQUIPMENT_STATUS = {
    0: "Operational",
    1: "Fault",
}
def lookup_EQUIPMENT_STATUS(value):
    return lookup_dict_EQUIPMENT_STATUS.get(value, "Unknown")

lookup_dict_encode_EQUIPMENT_STATUS = {
    "Operational" : 0,
    "Fault" : 1,
}
def lookup_encode_EQUIPMENT_STATUS(value):
    result = lookup_dict_encode_EQUIPMENT_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from EQUIPMENT_STATUS")
    return result

lookup_dict_MOB_STATUS = {
    0: "MOB Emitter Activated",
    1: "Manual on-board MOB Button Activation",
    2: "Test mode",
}
def lookup_MOB_STATUS(value):
    return lookup_dict_MOB_STATUS.get(value, "Unknown")

lookup_dict_encode_MOB_STATUS = {
    "MOB Emitter Activated" : 0,
    "Manual on-board MOB Button Activation" : 1,
    "Test mode" : 2,
}
def lookup_encode_MOB_STATUS(value):
    result = lookup_dict_encode_MOB_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from MOB_STATUS")
    return result

lookup_dict_LOW_BATTERY = {
    0: "Good",
    1: "Low",
}
def lookup_LOW_BATTERY(value):
    return lookup_dict_LOW_BATTERY.get(value, "Unknown")

lookup_dict_encode_LOW_BATTERY = {
    "Good" : 0,
    "Low" : 1,
}
def lookup_encode_LOW_BATTERY(value):
    result = lookup_dict_encode_LOW_BATTERY.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from LOW_BATTERY")
    return result

lookup_dict_TURN_MODE = {
    0: "Rudder limit controlled",
    1: "Turn rate controlled",
    2: "Radius controlled",
}
def lookup_TURN_MODE(value):
    return lookup_dict_TURN_MODE.get(value, "Unknown")

lookup_dict_encode_TURN_MODE = {
    "Rudder limit controlled" : 0,
    "Turn rate controlled" : 1,
    "Radius controlled" : 2,
}
def lookup_encode_TURN_MODE(value):
    result = lookup_dict_encode_TURN_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from TURN_MODE")
    return result

lookup_dict_ACCEPTABILITY = {
    0: "Bad level",
    1: "Bad frequency",
    2: "Being qualified",
    3: "Good",
}
def lookup_ACCEPTABILITY(value):
    return lookup_dict_ACCEPTABILITY.get(value, "Unknown")

lookup_dict_encode_ACCEPTABILITY = {
    "Bad level" : 0,
    "Bad frequency" : 1,
    "Being qualified" : 2,
    "Good" : 3,
}
def lookup_encode_ACCEPTABILITY(value):
    result = lookup_dict_encode_ACCEPTABILITY.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ACCEPTABILITY")
    return result

lookup_dict_LINE = {
    0: "Line 1",
    1: "Line 2",
    2: "Line 3",
}
def lookup_LINE(value):
    return lookup_dict_LINE.get(value, "Unknown")

lookup_dict_encode_LINE = {
    "Line 1" : 0,
    "Line 2" : 1,
    "Line 3" : 2,
}
def lookup_encode_LINE(value):
    result = lookup_dict_encode_LINE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from LINE")
    return result

lookup_dict_WAVEFORM = {
    0: "Sine wave",
    1: "Modified sine wave",
}
def lookup_WAVEFORM(value):
    return lookup_dict_WAVEFORM.get(value, "Unknown")

lookup_dict_encode_WAVEFORM = {
    "Sine wave" : 0,
    "Modified sine wave" : 1,
}
def lookup_encode_WAVEFORM(value):
    result = lookup_dict_encode_WAVEFORM.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from WAVEFORM")
    return result

lookup_dict_TANK_TYPE = {
    0: "Fuel",
    1: "Water",
    2: "Gray water",
    3: "Live well",
    4: "Oil",
    5: "Black water",
}
def lookup_TANK_TYPE(value):
    return lookup_dict_TANK_TYPE.get(value, "Unknown")

lookup_dict_encode_TANK_TYPE = {
    "Fuel" : 0,
    "Water" : 1,
    "Gray water" : 2,
    "Live well" : 3,
    "Oil" : 4,
    "Black water" : 5,
}
def lookup_encode_TANK_TYPE(value):
    result = lookup_dict_encode_TANK_TYPE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from TANK_TYPE")
    return result

lookup_dict_DC_SOURCE = {
    0: "Battery",
    1: "Alternator",
    2: "Convertor",
    3: "Solar cell",
    4: "Wind generator",
}
def lookup_DC_SOURCE(value):
    return lookup_dict_DC_SOURCE.get(value, "Unknown")

lookup_dict_encode_DC_SOURCE = {
    "Battery" : 0,
    "Alternator" : 1,
    "Convertor" : 2,
    "Solar cell" : 3,
    "Wind generator" : 4,
}
def lookup_encode_DC_SOURCE(value):
    result = lookup_dict_encode_DC_SOURCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DC_SOURCE")
    return result

lookup_dict_CHARGER_STATE = {
    0: "Not charging",
    1: "Bulk",
    2: "Absorption",
    3: "Overcharge",
    4: "Equalise",
    5: "Float",
    6: "No float",
    7: "Constant VI",
    8: "Disabled",
    9: "Fault",
}
def lookup_CHARGER_STATE(value):
    return lookup_dict_CHARGER_STATE.get(value, "Unknown")

lookup_dict_encode_CHARGER_STATE = {
    "Not charging" : 0,
    "Bulk" : 1,
    "Absorption" : 2,
    "Overcharge" : 3,
    "Equalise" : 4,
    "Float" : 5,
    "No float" : 6,
    "Constant VI" : 7,
    "Disabled" : 8,
    "Fault" : 9,
}
def lookup_encode_CHARGER_STATE(value):
    result = lookup_dict_encode_CHARGER_STATE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from CHARGER_STATE")
    return result

lookup_dict_CHARGING_ALGORITHM = {
    0: "Trickle",
    1: "Constant voltage / Constant current",
    2: "2 stage (no float)",
    3: "3 stage",
}
def lookup_CHARGING_ALGORITHM(value):
    return lookup_dict_CHARGING_ALGORITHM.get(value, "Unknown")

lookup_dict_encode_CHARGING_ALGORITHM = {
    "Trickle" : 0,
    "Constant voltage / Constant current" : 1,
    "2 stage (no float)" : 2,
    "3 stage" : 3,
}
def lookup_encode_CHARGING_ALGORITHM(value):
    result = lookup_dict_encode_CHARGING_ALGORITHM.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from CHARGING_ALGORITHM")
    return result

lookup_dict_CHARGER_MODE = {
    0: "Standalone",
    1: "Primary",
    2: "Secondary",
    3: "Echo",
}
def lookup_CHARGER_MODE(value):
    return lookup_dict_CHARGER_MODE.get(value, "Unknown")

lookup_dict_encode_CHARGER_MODE = {
    "Standalone" : 0,
    "Primary" : 1,
    "Secondary" : 2,
    "Echo" : 3,
}
def lookup_encode_CHARGER_MODE(value):
    result = lookup_dict_encode_CHARGER_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from CHARGER_MODE")
    return result

lookup_dict_INVERTER_STATE = {
    0: "Invert",
    1: "AC passthru",
    2: "Load sense",
    3: "Fault",
    4: "Disabled",
}
def lookup_INVERTER_STATE(value):
    return lookup_dict_INVERTER_STATE.get(value, "Unknown")

lookup_dict_encode_INVERTER_STATE = {
    "Invert" : 0,
    "AC passthru" : 1,
    "Load sense" : 2,
    "Fault" : 3,
    "Disabled" : 4,
}
def lookup_encode_INVERTER_STATE(value):
    result = lookup_dict_encode_INVERTER_STATE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from INVERTER_STATE")
    return result

lookup_dict_BATTERY_TYPE = {
    0: "Flooded",
    1: "Gel",
    2: "AGM",
}
def lookup_BATTERY_TYPE(value):
    return lookup_dict_BATTERY_TYPE.get(value, "Unknown")

lookup_dict_encode_BATTERY_TYPE = {
    "Flooded" : 0,
    "Gel" : 1,
    "AGM" : 2,
}
def lookup_encode_BATTERY_TYPE(value):
    result = lookup_dict_encode_BATTERY_TYPE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from BATTERY_TYPE")
    return result

lookup_dict_BATTERY_VOLTAGE = {
    0: "6V",
    1: "12V",
    2: "24V",
    3: "32V",
    4: "36V",
    5: "42V",
    6: "48V",
}
def lookup_BATTERY_VOLTAGE(value):
    return lookup_dict_BATTERY_VOLTAGE.get(value, "Unknown")

lookup_dict_encode_BATTERY_VOLTAGE = {
    "6V" : 0,
    "12V" : 1,
    "24V" : 2,
    "32V" : 3,
    "36V" : 4,
    "42V" : 5,
    "48V" : 6,
}
def lookup_encode_BATTERY_VOLTAGE(value):
    result = lookup_dict_encode_BATTERY_VOLTAGE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from BATTERY_VOLTAGE")
    return result

lookup_dict_BATTERY_CHEMISTRY = {
    0: "Pb (Lead)",
    1: "Li",
    2: "NiCd",
    3: "ZnO",
    4: "NiMH",
}
def lookup_BATTERY_CHEMISTRY(value):
    return lookup_dict_BATTERY_CHEMISTRY.get(value, "Unknown")

lookup_dict_encode_BATTERY_CHEMISTRY = {
    "Pb (Lead)" : 0,
    "Li" : 1,
    "NiCd" : 2,
    "ZnO" : 3,
    "NiMH" : 4,
}
def lookup_encode_BATTERY_CHEMISTRY(value):
    result = lookup_dict_encode_BATTERY_CHEMISTRY.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from BATTERY_CHEMISTRY")
    return result

lookup_dict_GOOD_WARNING_ERROR = {
    0: "Good",
    1: "Warning",
    2: "Error",
}
def lookup_GOOD_WARNING_ERROR(value):
    return lookup_dict_GOOD_WARNING_ERROR.get(value, "Unknown")

lookup_dict_encode_GOOD_WARNING_ERROR = {
    "Good" : 0,
    "Warning" : 1,
    "Error" : 2,
}
def lookup_encode_GOOD_WARNING_ERROR(value):
    result = lookup_dict_encode_GOOD_WARNING_ERROR.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from GOOD_WARNING_ERROR")
    return result

lookup_dict_TRACKING = {
    0: "Cancelled",
    1: "Acquiring",
    2: "Tracking",
    3: "Lost",
}
def lookup_TRACKING(value):
    return lookup_dict_TRACKING.get(value, "Unknown")

lookup_dict_encode_TRACKING = {
    "Cancelled" : 0,
    "Acquiring" : 1,
    "Tracking" : 2,
    "Lost" : 3,
}
def lookup_encode_TRACKING(value):
    result = lookup_dict_encode_TRACKING.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from TRACKING")
    return result

lookup_dict_TARGET_ACQUISITION = {
    0: "Manual",
    1: "Automatic",
}
def lookup_TARGET_ACQUISITION(value):
    return lookup_dict_TARGET_ACQUISITION.get(value, "Unknown")

lookup_dict_encode_TARGET_ACQUISITION = {
    "Manual" : 0,
    "Automatic" : 1,
}
def lookup_encode_TARGET_ACQUISITION(value):
    result = lookup_dict_encode_TARGET_ACQUISITION.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from TARGET_ACQUISITION")
    return result

lookup_dict_WINDLASS_DIRECTION = {
    0: "Off",
    1: "Down",
    2: "Up",
}
def lookup_WINDLASS_DIRECTION(value):
    return lookup_dict_WINDLASS_DIRECTION.get(value, "Unknown")

lookup_dict_encode_WINDLASS_DIRECTION = {
    "Off" : 0,
    "Down" : 1,
    "Up" : 2,
}
def lookup_encode_WINDLASS_DIRECTION(value):
    result = lookup_dict_encode_WINDLASS_DIRECTION.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from WINDLASS_DIRECTION")
    return result

lookup_dict_SPEED_TYPE = {
    0: "Single speed",
    1: "Dual speed",
    2: "Proportional speed",
}
def lookup_SPEED_TYPE(value):
    return lookup_dict_SPEED_TYPE.get(value, "Unknown")

lookup_dict_encode_SPEED_TYPE = {
    "Single speed" : 0,
    "Dual speed" : 1,
    "Proportional speed" : 2,
}
def lookup_encode_SPEED_TYPE(value):
    result = lookup_dict_encode_SPEED_TYPE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SPEED_TYPE")
    return result

lookup_dict_WINDLASS_MOTION = {
    0: "Windlass stopped",
    1: "Deployment occurring",
    2: "Retrieval occurring",
}
def lookup_WINDLASS_MOTION(value):
    return lookup_dict_WINDLASS_MOTION.get(value, "Unknown")

lookup_dict_encode_WINDLASS_MOTION = {
    "Windlass stopped" : 0,
    "Deployment occurring" : 1,
    "Retrieval occurring" : 2,
}
def lookup_encode_WINDLASS_MOTION(value):
    result = lookup_dict_encode_WINDLASS_MOTION.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from WINDLASS_MOTION")
    return result

lookup_dict_RODE_TYPE = {
    0: "Chain presently detected",
    1: "Rope presently detected",
}
def lookup_RODE_TYPE(value):
    return lookup_dict_RODE_TYPE.get(value, "Unknown")

lookup_dict_encode_RODE_TYPE = {
    "Chain presently detected" : 0,
    "Rope presently detected" : 1,
}
def lookup_encode_RODE_TYPE(value):
    result = lookup_dict_encode_RODE_TYPE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from RODE_TYPE")
    return result

lookup_dict_DOCKING_STATUS = {
    0: "Not docked",
    1: "Fully docked",
}
def lookup_DOCKING_STATUS(value):
    return lookup_dict_DOCKING_STATUS.get(value, "Unknown")

lookup_dict_encode_DOCKING_STATUS = {
    "Not docked" : 0,
    "Fully docked" : 1,
}
def lookup_encode_DOCKING_STATUS(value):
    result = lookup_dict_encode_DOCKING_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DOCKING_STATUS")
    return result

lookup_dict_AIS_TYPE = {
    0: "SOTDMA",
    1: "CS",
}
def lookup_AIS_TYPE(value):
    return lookup_dict_AIS_TYPE.get(value, "Unknown")

lookup_dict_encode_AIS_TYPE = {
    "SOTDMA" : 0,
    "CS" : 1,
}
def lookup_encode_AIS_TYPE(value):
    result = lookup_dict_encode_AIS_TYPE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIS_TYPE")
    return result

lookup_dict_AIS_BAND = {
    0: "Top 525 kHz of marine band",
    1: "Entire marine band",
}
def lookup_AIS_BAND(value):
    return lookup_dict_AIS_BAND.get(value, "Unknown")

lookup_dict_encode_AIS_BAND = {
    "Top 525 kHz of marine band" : 0,
    "Entire marine band" : 1,
}
def lookup_encode_AIS_BAND(value):
    result = lookup_dict_encode_AIS_BAND.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIS_BAND")
    return result

lookup_dict_AIS_MODE = {
    0: "Autonomous",
    1: "Assigned",
}
def lookup_AIS_MODE(value):
    return lookup_dict_AIS_MODE.get(value, "Unknown")

lookup_dict_encode_AIS_MODE = {
    "Autonomous" : 0,
    "Assigned" : 1,
}
def lookup_encode_AIS_MODE(value):
    result = lookup_dict_encode_AIS_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIS_MODE")
    return result

lookup_dict_AIS_COMMUNICATION_STATE = {
    0: "SOTDMA",
    1: "ITDMA",
}
def lookup_AIS_COMMUNICATION_STATE(value):
    return lookup_dict_AIS_COMMUNICATION_STATE.get(value, "Unknown")

lookup_dict_encode_AIS_COMMUNICATION_STATE = {
    "SOTDMA" : 0,
    "ITDMA" : 1,
}
def lookup_encode_AIS_COMMUNICATION_STATE(value):
    result = lookup_dict_encode_AIS_COMMUNICATION_STATE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIS_COMMUNICATION_STATE")
    return result

lookup_dict_AVAILABLE = {
    0: "Available",
    1: "Not available",
}
def lookup_AVAILABLE(value):
    return lookup_dict_AVAILABLE.get(value, "Unknown")

lookup_dict_encode_AVAILABLE = {
    "Available" : 0,
    "Not available" : 1,
}
def lookup_encode_AVAILABLE(value):
    result = lookup_dict_encode_AVAILABLE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AVAILABLE")
    return result

lookup_dict_BEARING_MODE = {
    0: "Great Circle",
    1: "Rhumbline",
}
def lookup_BEARING_MODE(value):
    return lookup_dict_BEARING_MODE.get(value, "Unknown")

lookup_dict_encode_BEARING_MODE = {
    "Great Circle" : 0,
    "Rhumbline" : 1,
}
def lookup_encode_BEARING_MODE(value):
    result = lookup_dict_encode_BEARING_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from BEARING_MODE")
    return result

lookup_dict_MARK_TYPE = {
    0: "Collision",
    1: "Turning point",
    2: "Reference",
    3: "Wheelover",
    4: "Waypoint",
}
def lookup_MARK_TYPE(value):
    return lookup_dict_MARK_TYPE.get(value, "Unknown")

lookup_dict_encode_MARK_TYPE = {
    "Collision" : 0,
    "Turning point" : 1,
    "Reference" : 2,
    "Wheelover" : 3,
    "Waypoint" : 4,
}
def lookup_encode_MARK_TYPE(value):
    result = lookup_dict_encode_MARK_TYPE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from MARK_TYPE")
    return result

lookup_dict_GNSS_MODE = {
    0: "1D",
    1: "2D",
    2: "3D",
    3: "Auto",
}
def lookup_GNSS_MODE(value):
    return lookup_dict_GNSS_MODE.get(value, "Unknown")

lookup_dict_encode_GNSS_MODE = {
    "1D" : 0,
    "2D" : 1,
    "3D" : 2,
    "Auto" : 3,
}
def lookup_encode_GNSS_MODE(value):
    result = lookup_dict_encode_GNSS_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from GNSS_MODE")
    return result

lookup_dict_RANGE_RESIDUAL_MODE = {
    0: "Range residuals were used to calculate data",
    1: "Range residuals were calculated after the position",
}
def lookup_RANGE_RESIDUAL_MODE(value):
    return lookup_dict_RANGE_RESIDUAL_MODE.get(value, "Unknown")

lookup_dict_encode_RANGE_RESIDUAL_MODE = {
    "Range residuals were used to calculate data" : 0,
    "Range residuals were calculated after the position" : 1,
}
def lookup_encode_RANGE_RESIDUAL_MODE(value):
    result = lookup_dict_encode_RANGE_RESIDUAL_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from RANGE_RESIDUAL_MODE")
    return result

lookup_dict_DGNSS_MODE = {
    0: "None",
    1: "SBAS if available",
    3: "SBAS",
}
def lookup_DGNSS_MODE(value):
    return lookup_dict_DGNSS_MODE.get(value, "Unknown")

lookup_dict_encode_DGNSS_MODE = {
    "None" : 0,
    "SBAS if available" : 1,
    "SBAS" : 3,
}
def lookup_encode_DGNSS_MODE(value):
    result = lookup_dict_encode_DGNSS_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DGNSS_MODE")
    return result

lookup_dict_SATELLITE_STATUS = {
    0: "Not tracked",
    1: "Tracked",
    2: "Used",
    3: "Not tracked+Diff",
    4: "Tracked+Diff",
    5: "Used+Diff",
}
def lookup_SATELLITE_STATUS(value):
    return lookup_dict_SATELLITE_STATUS.get(value, "Unknown")

lookup_dict_encode_SATELLITE_STATUS = {
    "Not tracked" : 0,
    "Tracked" : 1,
    "Used" : 2,
    "Not tracked+Diff" : 3,
    "Tracked+Diff" : 4,
    "Used+Diff" : 5,
}
def lookup_encode_SATELLITE_STATUS(value):
    result = lookup_dict_encode_SATELLITE_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SATELLITE_STATUS")
    return result

lookup_dict_AIS_VERSION = {
    0: "ITU-R M.1371-1",
    1: "ITU-R M.1371-3",
    2: "ITU-R M.1371-5",
    3: "ITU-R M.1371 future edition",
}
def lookup_AIS_VERSION(value):
    return lookup_dict_AIS_VERSION.get(value, "Unknown")

lookup_dict_encode_AIS_VERSION = {
    "ITU-R M.1371-1" : 0,
    "ITU-R M.1371-3" : 1,
    "ITU-R M.1371-5" : 2,
    "ITU-R M.1371 future edition" : 3,
}
def lookup_encode_AIS_VERSION(value):
    result = lookup_dict_encode_AIS_VERSION.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIS_VERSION")
    return result

lookup_dict_TIDE = {
    0: "Falling",
    1: "Rising",
}
def lookup_TIDE(value):
    return lookup_dict_TIDE.get(value, "Unknown")

lookup_dict_encode_TIDE = {
    "Falling" : 0,
    "Rising" : 1,
}
def lookup_encode_TIDE(value):
    result = lookup_dict_encode_TIDE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from TIDE")
    return result

lookup_dict_WATERMAKER_STATE = {
    0: "Stopped",
    1: "Starting",
    2: "Running",
    3: "Stopping",
    4: "Flushing",
    5: "Rinsing",
    6: "Initiating",
    7: "Manual",
}
def lookup_WATERMAKER_STATE(value):
    return lookup_dict_WATERMAKER_STATE.get(value, "Unknown")

lookup_dict_encode_WATERMAKER_STATE = {
    "Stopped" : 0,
    "Starting" : 1,
    "Running" : 2,
    "Stopping" : 3,
    "Flushing" : 4,
    "Rinsing" : 5,
    "Initiating" : 6,
    "Manual" : 7,
}
def lookup_encode_WATERMAKER_STATE(value):
    result = lookup_dict_encode_WATERMAKER_STATE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from WATERMAKER_STATE")
    return result

lookup_dict_ENTERTAINMENT_ID_TYPE = {
    0: "Group",
    1: "File",
    2: "Encrypted group",
    3: "Encrypted file",
}
def lookup_ENTERTAINMENT_ID_TYPE(value):
    return lookup_dict_ENTERTAINMENT_ID_TYPE.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_ID_TYPE = {
    "Group" : 0,
    "File" : 1,
    "Encrypted group" : 2,
    "Encrypted file" : 3,
}
def lookup_encode_ENTERTAINMENT_ID_TYPE(value):
    result = lookup_dict_encode_ENTERTAINMENT_ID_TYPE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_ID_TYPE")
    return result

lookup_dict_ENTERTAINMENT_DEFAULT_SETTINGS = {
    0: "Save current settings as user default",
    1: "Load user default",
    2: "Load manufacturer default",
}
def lookup_ENTERTAINMENT_DEFAULT_SETTINGS(value):
    return lookup_dict_ENTERTAINMENT_DEFAULT_SETTINGS.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_DEFAULT_SETTINGS = {
    "Save current settings as user default" : 0,
    "Load user default" : 1,
    "Load manufacturer default" : 2,
}
def lookup_encode_ENTERTAINMENT_DEFAULT_SETTINGS(value):
    result = lookup_dict_encode_ENTERTAINMENT_DEFAULT_SETTINGS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_DEFAULT_SETTINGS")
    return result

lookup_dict_ENTERTAINMENT_REGIONS = {
    0: "USA",
    1: "Europe",
    2: "Asia",
    3: "Middle East",
    4: "Latin America",
    5: "Australia",
    6: "Russia",
    7: "Japan",
}
def lookup_ENTERTAINMENT_REGIONS(value):
    return lookup_dict_ENTERTAINMENT_REGIONS.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_REGIONS = {
    "USA" : 0,
    "Europe" : 1,
    "Asia" : 2,
    "Middle East" : 3,
    "Latin America" : 4,
    "Australia" : 5,
    "Russia" : 6,
    "Japan" : 7,
}
def lookup_encode_ENTERTAINMENT_REGIONS(value):
    result = lookup_dict_encode_ENTERTAINMENT_REGIONS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_REGIONS")
    return result

lookup_dict_VIDEO_PROTOCOLS = {
    0: "PAL",
    1: "NTSC",
}
def lookup_VIDEO_PROTOCOLS(value):
    return lookup_dict_VIDEO_PROTOCOLS.get(value, "Unknown")

lookup_dict_encode_VIDEO_PROTOCOLS = {
    "PAL" : 0,
    "NTSC" : 1,
}
def lookup_encode_VIDEO_PROTOCOLS(value):
    result = lookup_dict_encode_VIDEO_PROTOCOLS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from VIDEO_PROTOCOLS")
    return result

lookup_dict_ENTERTAINMENT_VOLUME_CONTROL = {
    0: "Up",
    1: "Down",
}
def lookup_ENTERTAINMENT_VOLUME_CONTROL(value):
    return lookup_dict_ENTERTAINMENT_VOLUME_CONTROL.get(value, "Unknown")

lookup_dict_encode_ENTERTAINMENT_VOLUME_CONTROL = {
    "Up" : 0,
    "Down" : 1,
}
def lookup_encode_ENTERTAINMENT_VOLUME_CONTROL(value):
    result = lookup_dict_encode_ENTERTAINMENT_VOLUME_CONTROL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ENTERTAINMENT_VOLUME_CONTROL")
    return result

lookup_dict_BLUETOOTH_STATUS = {
    0: "Connected",
    1: "Not connected",
    2: "Not paired",
}
def lookup_BLUETOOTH_STATUS(value):
    return lookup_dict_BLUETOOTH_STATUS.get(value, "Unknown")

lookup_dict_encode_BLUETOOTH_STATUS = {
    "Connected" : 0,
    "Not connected" : 1,
    "Not paired" : 2,
}
def lookup_encode_BLUETOOTH_STATUS(value):
    result = lookup_dict_encode_BLUETOOTH_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from BLUETOOTH_STATUS")
    return result

lookup_dict_BLUETOOTH_SOURCE_STATUS = {
    0: "Reserved",
    1: "Connected",
    2: "Connecting",
    3: "Not connected",
}
def lookup_BLUETOOTH_SOURCE_STATUS(value):
    return lookup_dict_BLUETOOTH_SOURCE_STATUS.get(value, "Unknown")

lookup_dict_encode_BLUETOOTH_SOURCE_STATUS = {
    "Reserved" : 0,
    "Connected" : 1,
    "Connecting" : 2,
    "Not connected" : 3,
}
def lookup_encode_BLUETOOTH_SOURCE_STATUS(value):
    result = lookup_dict_encode_BLUETOOTH_SOURCE_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from BLUETOOTH_SOURCE_STATUS")
    return result

lookup_dict_SONICHUB_COMMAND = {
    1: "Init #2",
    4: "AM Radio",
    5: "Zone Info",
    6: "Source",
    8: "Source List",
    9: "Control",
    12: "FM Radio",
    13: "Playlist",
    14: "Track",
    15: "Artist",
    16: "Album",
    19: "Menu Item",
    20: "Zones",
    23: "Max Volume",
    24: "Volume",
    25: "Init #1",
    48: "Position",
    50: "Init #3",
}
def lookup_SONICHUB_COMMAND(value):
    return lookup_dict_SONICHUB_COMMAND.get(value, "Unknown")

lookup_dict_encode_SONICHUB_COMMAND = {
    "Init #2" : 1,
    "AM Radio" : 4,
    "Zone Info" : 5,
    "Source" : 6,
    "Source List" : 8,
    "Control" : 9,
    "FM Radio" : 12,
    "Playlist" : 13,
    "Track" : 14,
    "Artist" : 15,
    "Album" : 16,
    "Menu Item" : 19,
    "Zones" : 20,
    "Max Volume" : 23,
    "Volume" : 24,
    "Init #1" : 25,
    "Position" : 48,
    "Init #3" : 50,
}
def lookup_encode_SONICHUB_COMMAND(value):
    result = lookup_dict_encode_SONICHUB_COMMAND.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SONICHUB_COMMAND")
    return result

lookup_dict_SIMNET_AP_MODE = {
    2: "Heading",
    3: "Wind",
    10: "Nav",
    11: "No Drift",
}
def lookup_SIMNET_AP_MODE(value):
    return lookup_dict_SIMNET_AP_MODE.get(value, "Unknown")

lookup_dict_encode_SIMNET_AP_MODE = {
    "Heading" : 2,
    "Wind" : 3,
    "Nav" : 10,
    "No Drift" : 11,
}
def lookup_encode_SIMNET_AP_MODE(value):
    result = lookup_dict_encode_SIMNET_AP_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_AP_MODE")
    return result

lookup_dict_SIMNET_DEVICE_MODEL = {
    0: "AC",
    1: "Other device",
    100: "NAC",
}
def lookup_SIMNET_DEVICE_MODEL(value):
    return lookup_dict_SIMNET_DEVICE_MODEL.get(value, "Unknown")

lookup_dict_encode_SIMNET_DEVICE_MODEL = {
    "AC" : 0,
    "Other device" : 1,
    "NAC" : 100,
}
def lookup_encode_SIMNET_DEVICE_MODEL(value):
    result = lookup_dict_encode_SIMNET_DEVICE_MODEL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_DEVICE_MODEL")
    return result

lookup_dict_SIMNET_DEVICE_REPORT = {
    2: "Status",
    3: "Send Status",
    10: "Mode",
    11: "Send Mode",
    23: "Sailing Processor Status",
}
def lookup_SIMNET_DEVICE_REPORT(value):
    return lookup_dict_SIMNET_DEVICE_REPORT.get(value, "Unknown")

lookup_dict_encode_SIMNET_DEVICE_REPORT = {
    "Status" : 2,
    "Send Status" : 3,
    "Mode" : 10,
    "Send Mode" : 11,
    "Sailing Processor Status" : 23,
}
def lookup_encode_SIMNET_DEVICE_REPORT(value):
    result = lookup_dict_encode_SIMNET_DEVICE_REPORT.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_DEVICE_REPORT")
    return result

lookup_dict_SIMNET_AP_STATUS = {
    2: "Manual",
    16: "Automatic",
}
def lookup_SIMNET_AP_STATUS(value):
    return lookup_dict_SIMNET_AP_STATUS.get(value, "Unknown")

lookup_dict_encode_SIMNET_AP_STATUS = {
    "Manual" : 2,
    "Automatic" : 16,
}
def lookup_encode_SIMNET_AP_STATUS(value):
    result = lookup_dict_encode_SIMNET_AP_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_AP_STATUS")
    return result

lookup_dict_SIMNET_COMMAND = {
    50: "Text",
}
def lookup_SIMNET_COMMAND(value):
    return lookup_dict_SIMNET_COMMAND.get(value, "Unknown")

lookup_dict_encode_SIMNET_COMMAND = {
    "Text" : 50,
}
def lookup_encode_SIMNET_COMMAND(value):
    result = lookup_dict_encode_SIMNET_COMMAND.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_COMMAND")
    return result

lookup_dict_SIMNET_EVENT_COMMAND = {
    1: "Alarm",
    2: "AP command",
    255: "Autopilot",
}
def lookup_SIMNET_EVENT_COMMAND(value):
    return lookup_dict_SIMNET_EVENT_COMMAND.get(value, "Unknown")

lookup_dict_encode_SIMNET_EVENT_COMMAND = {
    "Alarm" : 1,
    "AP command" : 2,
    "Autopilot" : 255,
}
def lookup_encode_SIMNET_EVENT_COMMAND(value):
    result = lookup_dict_encode_SIMNET_EVENT_COMMAND.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_EVENT_COMMAND")
    return result

lookup_dict_SIMNET_NIGHT_MODE = {
    2: "Day",
    4: "Night",
}
def lookup_SIMNET_NIGHT_MODE(value):
    return lookup_dict_SIMNET_NIGHT_MODE.get(value, "Unknown")

lookup_dict_encode_SIMNET_NIGHT_MODE = {
    "Day" : 2,
    "Night" : 4,
}
def lookup_encode_SIMNET_NIGHT_MODE(value):
    result = lookup_dict_encode_SIMNET_NIGHT_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_NIGHT_MODE")
    return result

lookup_dict_SIMNET_NIGHT_MODE_COLOR = {
    0: "Red",
    1: "Green",
    2: "Blue",
    3: "White",
}
def lookup_SIMNET_NIGHT_MODE_COLOR(value):
    return lookup_dict_SIMNET_NIGHT_MODE_COLOR.get(value, "Unknown")

lookup_dict_encode_SIMNET_NIGHT_MODE_COLOR = {
    "Red" : 0,
    "Green" : 1,
    "Blue" : 2,
    "White" : 3,
}
def lookup_encode_SIMNET_NIGHT_MODE_COLOR(value):
    result = lookup_dict_encode_SIMNET_NIGHT_MODE_COLOR.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_NIGHT_MODE_COLOR")
    return result

lookup_dict_SIMNET_DISPLAY_GROUP = {
    1: "Default",
    2: "Group 1",
    3: "Group 2",
    4: "Group 3",
    5: "Group 4",
    6: "Group 5",
    7: "Group 6",
}
def lookup_SIMNET_DISPLAY_GROUP(value):
    return lookup_dict_SIMNET_DISPLAY_GROUP.get(value, "Unknown")

lookup_dict_encode_SIMNET_DISPLAY_GROUP = {
    "Default" : 1,
    "Group 1" : 2,
    "Group 2" : 3,
    "Group 3" : 4,
    "Group 4" : 5,
    "Group 5" : 6,
    "Group 6" : 7,
}
def lookup_encode_SIMNET_DISPLAY_GROUP(value):
    result = lookup_dict_encode_SIMNET_DISPLAY_GROUP.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_DISPLAY_GROUP")
    return result

lookup_dict_SIMNET_HOUR_DISPLAY = {
    0: "24 hour",
    1: "12 hour",
}
def lookup_SIMNET_HOUR_DISPLAY(value):
    return lookup_dict_SIMNET_HOUR_DISPLAY.get(value, "Unknown")

lookup_dict_encode_SIMNET_HOUR_DISPLAY = {
    "24 hour" : 0,
    "12 hour" : 1,
}
def lookup_encode_SIMNET_HOUR_DISPLAY(value):
    result = lookup_dict_encode_SIMNET_HOUR_DISPLAY.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_HOUR_DISPLAY")
    return result

lookup_dict_SIMNET_TIME_FORMAT = {
    1: "MM/dd/yyyy",
    2: "dd/MM/yyyy",
}
def lookup_SIMNET_TIME_FORMAT(value):
    return lookup_dict_SIMNET_TIME_FORMAT.get(value, "Unknown")

lookup_dict_encode_SIMNET_TIME_FORMAT = {
    "MM/dd/yyyy" : 1,
    "dd/MM/yyyy" : 2,
}
def lookup_encode_SIMNET_TIME_FORMAT(value):
    result = lookup_dict_encode_SIMNET_TIME_FORMAT.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_TIME_FORMAT")
    return result

lookup_dict_SIMNET_BACKLIGHT_LEVEL = {
    0: "10% (Min)",
    1: "Day mode",
    4: "Night mode",
    11: "20%",
    22: "30%",
    33: "40%",
    44: "50%",
    55: "60%",
    66: "70%",
    77: "80%",
    88: "90%",
    99: "100% (Max)",
}
def lookup_SIMNET_BACKLIGHT_LEVEL(value):
    return lookup_dict_SIMNET_BACKLIGHT_LEVEL.get(value, "Unknown")

lookup_dict_encode_SIMNET_BACKLIGHT_LEVEL = {
    "10% (Min)" : 0,
    "Day mode" : 1,
    "Night mode" : 4,
    "20%" : 11,
    "30%" : 22,
    "40%" : 33,
    "50%" : 44,
    "60%" : 55,
    "70%" : 66,
    "80%" : 77,
    "90%" : 88,
    "100% (Max)" : 99,
}
def lookup_encode_SIMNET_BACKLIGHT_LEVEL(value):
    result = lookup_dict_encode_SIMNET_BACKLIGHT_LEVEL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_BACKLIGHT_LEVEL")
    return result

lookup_dict_SIMNET_AP_EVENTS = {
    6: "Standby",
    9: "Auto mode",
    10: "Nav mode",
    13: "Non Follow Up mode",
    14: "Follow Up mode",
    15: "Wind mode",
    18: "Square (Turn)",
    19: "C-Turn",
    20: "U-Turn",
    21: "Spiral (Turn)",
    22: "Zig Zag (Turn)",
    23: "Lazy-S (Turn)",
    24: "Depth (Turn)",
    26: "Change course",
    61: "Timer sync",
    112: "Ping port end",
    113: "Ping starboard end",
}
def lookup_SIMNET_AP_EVENTS(value):
    return lookup_dict_SIMNET_AP_EVENTS.get(value, "Unknown")

lookup_dict_encode_SIMNET_AP_EVENTS = {
    "Standby" : 6,
    "Auto mode" : 9,
    "Nav mode" : 10,
    "Non Follow Up mode" : 13,
    "Follow Up mode" : 14,
    "Wind mode" : 15,
    "Square (Turn)" : 18,
    "C-Turn" : 19,
    "U-Turn" : 20,
    "Spiral (Turn)" : 21,
    "Zig Zag (Turn)" : 22,
    "Lazy-S (Turn)" : 23,
    "Depth (Turn)" : 24,
    "Change course" : 26,
    "Timer sync" : 61,
    "Ping port end" : 112,
    "Ping starboard end" : 113,
}
def lookup_encode_SIMNET_AP_EVENTS(value):
    result = lookup_dict_encode_SIMNET_AP_EVENTS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_AP_EVENTS")
    return result

lookup_dict_SIMNET_DIRECTION = {
    2: "Port",
    3: "Starboard",
    4: "Left rudder (port)",
    5: "Right rudder (starboard)",
}
def lookup_SIMNET_DIRECTION(value):
    return lookup_dict_SIMNET_DIRECTION.get(value, "Unknown")

lookup_dict_encode_SIMNET_DIRECTION = {
    "Port" : 2,
    "Starboard" : 3,
    "Left rudder (port)" : 4,
    "Right rudder (starboard)" : 5,
}
def lookup_encode_SIMNET_DIRECTION(value):
    result = lookup_dict_encode_SIMNET_DIRECTION.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_DIRECTION")
    return result

lookup_dict_SIMNET_ALARM = {
    57: "Low boat speed",
    58: "Wind data missing",
}
def lookup_SIMNET_ALARM(value):
    return lookup_dict_SIMNET_ALARM.get(value, "Unknown")

lookup_dict_encode_SIMNET_ALARM = {
    "Low boat speed" : 57,
    "Wind data missing" : 58,
}
def lookup_encode_SIMNET_ALARM(value):
    result = lookup_dict_encode_SIMNET_ALARM.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SIMNET_ALARM")
    return result

lookup_dict_FUSION_MESSAGE_ID = {
    1: "Request Status",
    2: "Source",
    4: "Track Info",
    5: "Track Title",
    6: "Track Artist",
    7: "Track Album",
    9: "Track Progress",
    11: "AM/FM Station",
    12: "VHF",
    13: "Squelch",
    14: "Scan",
    17: "Menu Item",
    20: "Replay",
    23: "Mute",
    24: "Set Zone Volume",
    25: "Set All Volumes",
    26: "Sub Volume",
    27: "Tone",
    29: "Volume",
    32: "Power",
    33: "Unit Name",
    36: "SiriusXM Channel",
    37: "SiriusXM Title",
    38: "SiriusXM Artist",
    40: "SiriusXM Genre",
    45: "Zone Name",
}
def lookup_FUSION_MESSAGE_ID(value):
    return lookup_dict_FUSION_MESSAGE_ID.get(value, "Unknown")

lookup_dict_encode_FUSION_MESSAGE_ID = {
    "Request Status" : 1,
    "Source" : 2,
    "Track Info" : 4,
    "Track Title" : 5,
    "Track Artist" : 6,
    "Track Album" : 7,
    "Track Progress" : 9,
    "AM/FM Station" : 11,
    "VHF" : 12,
    "Squelch" : 13,
    "Scan" : 14,
    "Menu Item" : 17,
    "Replay" : 20,
    "Mute" : 23,
    "Set Zone Volume" : 24,
    "Set All Volumes" : 25,
    "Sub Volume" : 26,
    "Tone" : 27,
    "Volume" : 29,
    "Power" : 32,
    "Unit Name" : 33,
    "SiriusXM Channel" : 36,
    "SiriusXM Title" : 37,
    "SiriusXM Artist" : 38,
    "SiriusXM Genre" : 40,
    "Zone Name" : 45,
}
def lookup_encode_FUSION_MESSAGE_ID(value):
    result = lookup_dict_encode_FUSION_MESSAGE_ID.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from FUSION_MESSAGE_ID")
    return result

lookup_dict_SONICHUB_CONTROL = {
    0: "Set",
    128: "Ack",
}
def lookup_SONICHUB_CONTROL(value):
    return lookup_dict_SONICHUB_CONTROL.get(value, "Unknown")

lookup_dict_encode_SONICHUB_CONTROL = {
    "Set" : 0,
    "Ack" : 128,
}
def lookup_encode_SONICHUB_CONTROL(value):
    result = lookup_dict_encode_SONICHUB_CONTROL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SONICHUB_CONTROL")
    return result

lookup_dict_SONICHUB_SOURCE = {
    0: "AM",
    1: "FM",
    2: "iPod",
    3: "USB",
    4: "AUX",
    5: "AUX 2",
    6: "Mic",
}
def lookup_SONICHUB_SOURCE(value):
    return lookup_dict_SONICHUB_SOURCE.get(value, "Unknown")

lookup_dict_encode_SONICHUB_SOURCE = {
    "AM" : 0,
    "FM" : 1,
    "iPod" : 2,
    "USB" : 3,
    "AUX" : 4,
    "AUX 2" : 5,
    "Mic" : 6,
}
def lookup_encode_SONICHUB_SOURCE(value):
    result = lookup_dict_encode_SONICHUB_SOURCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SONICHUB_SOURCE")
    return result

lookup_dict_ISO_CONTROL = {
    0: "ACK",
    1: "NAK",
    2: "Access Denied",
    3: "Address Busy",
}
def lookup_ISO_CONTROL(value):
    return lookup_dict_ISO_CONTROL.get(value, "Unknown")

lookup_dict_encode_ISO_CONTROL = {
    "ACK" : 0,
    "NAK" : 1,
    "Access Denied" : 2,
    "Address Busy" : 3,
}
def lookup_encode_ISO_CONTROL(value):
    result = lookup_dict_encode_ISO_CONTROL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ISO_CONTROL")
    return result

lookup_dict_ISO_COMMAND = {
    0: "ACK",
    16: "RTS",
    17: "CTS",
    19: "EOM",
    32: "BAM",
    255: "Abort",
}
def lookup_ISO_COMMAND(value):
    return lookup_dict_ISO_COMMAND.get(value, "Unknown")

lookup_dict_encode_ISO_COMMAND = {
    "ACK" : 0,
    "RTS" : 16,
    "CTS" : 17,
    "EOM" : 19,
    "BAM" : 32,
    "Abort" : 255,
}
def lookup_encode_ISO_COMMAND(value):
    result = lookup_dict_encode_ISO_COMMAND.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from ISO_COMMAND")
    return result

lookup_dict_GROUP_FUNCTION = {
    0: "Request",
    1: "Command",
    2: "Acknowledge",
    3: "Read Fields",
    4: "Read Fields Reply",
    5: "Write Fields",
    6: "Write Fields Reply",
}
def lookup_GROUP_FUNCTION(value):
    return lookup_dict_GROUP_FUNCTION.get(value, "Unknown")

lookup_dict_encode_GROUP_FUNCTION = {
    "Request" : 0,
    "Command" : 1,
    "Acknowledge" : 2,
    "Read Fields" : 3,
    "Read Fields Reply" : 4,
    "Write Fields" : 5,
    "Write Fields Reply" : 6,
}
def lookup_encode_GROUP_FUNCTION(value):
    result = lookup_dict_encode_GROUP_FUNCTION.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from GROUP_FUNCTION")
    return result

lookup_dict_AIRMAR_COMMAND = {
    32: "Attitude Offsets",
    33: "Calibrate Compass",
    34: "True Wind Options",
    35: "Simulate Mode",
    40: "Calibrate Depth",
    41: "Calibrate Speed",
    42: "Calibrate Temperature",
    43: "Speed Filter",
    44: "Temperature Filter",
    46: "NMEA 2000 options",
}
def lookup_AIRMAR_COMMAND(value):
    return lookup_dict_AIRMAR_COMMAND.get(value, "Unknown")

lookup_dict_encode_AIRMAR_COMMAND = {
    "Attitude Offsets" : 32,
    "Calibrate Compass" : 33,
    "True Wind Options" : 34,
    "Simulate Mode" : 35,
    "Calibrate Depth" : 40,
    "Calibrate Speed" : 41,
    "Calibrate Temperature" : 42,
    "Speed Filter" : 43,
    "Temperature Filter" : 44,
    "NMEA 2000 options" : 46,
}
def lookup_encode_AIRMAR_COMMAND(value):
    result = lookup_dict_encode_AIRMAR_COMMAND.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIRMAR_COMMAND")
    return result

lookup_dict_AIRMAR_DEPTH_QUALITY_FACTOR = {
    0: "Depth unlocked",
    1: "Quality 10%",
    2: "Quality 20%",
    3: "Quality 30%",
    4: "Quality 40%",
    5: "Quality 50%",
    6: "Quality 60%",
    7: "Quality 70%",
    8: "Quality 80%",
    9: "Quality 90%",
    10: "Quality 100%",
}
def lookup_AIRMAR_DEPTH_QUALITY_FACTOR(value):
    return lookup_dict_AIRMAR_DEPTH_QUALITY_FACTOR.get(value, "Unknown")

lookup_dict_encode_AIRMAR_DEPTH_QUALITY_FACTOR = {
    "Depth unlocked" : 0,
    "Quality 10%" : 1,
    "Quality 20%" : 2,
    "Quality 30%" : 3,
    "Quality 40%" : 4,
    "Quality 50%" : 5,
    "Quality 60%" : 6,
    "Quality 70%" : 7,
    "Quality 80%" : 8,
    "Quality 90%" : 9,
    "Quality 100%" : 10,
}
def lookup_encode_AIRMAR_DEPTH_QUALITY_FACTOR(value):
    result = lookup_dict_encode_AIRMAR_DEPTH_QUALITY_FACTOR.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIRMAR_DEPTH_QUALITY_FACTOR")
    return result

lookup_dict_PGN_ERROR_CODE = {
    0: "Acknowledge",
    1: "PGN not supported",
    2: "PGN not available",
    3: "Access denied",
    4: "Not supported",
    5: "Tag not supported",
    6: "Read or Write not supported",
}
def lookup_PGN_ERROR_CODE(value):
    return lookup_dict_PGN_ERROR_CODE.get(value, "Unknown")

lookup_dict_encode_PGN_ERROR_CODE = {
    "Acknowledge" : 0,
    "PGN not supported" : 1,
    "PGN not available" : 2,
    "Access denied" : 3,
    "Not supported" : 4,
    "Tag not supported" : 5,
    "Read or Write not supported" : 6,
}
def lookup_encode_PGN_ERROR_CODE(value):
    result = lookup_dict_encode_PGN_ERROR_CODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from PGN_ERROR_CODE")
    return result

lookup_dict_AIRMAR_TRANSMISSION_INTERVAL = {
    0: "Measure interval",
    1: "Requested by user",
}
def lookup_AIRMAR_TRANSMISSION_INTERVAL(value):
    return lookup_dict_AIRMAR_TRANSMISSION_INTERVAL.get(value, "Unknown")

lookup_dict_encode_AIRMAR_TRANSMISSION_INTERVAL = {
    "Measure interval" : 0,
    "Requested by user" : 1,
}
def lookup_encode_AIRMAR_TRANSMISSION_INTERVAL(value):
    result = lookup_dict_encode_AIRMAR_TRANSMISSION_INTERVAL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIRMAR_TRANSMISSION_INTERVAL")
    return result

lookup_dict_MOB_POSITION_SOURCE = {
    0: "Position estimated by the vessel",
    1: "Position reported by MOB emitter",
}
def lookup_MOB_POSITION_SOURCE(value):
    return lookup_dict_MOB_POSITION_SOURCE.get(value, "Unknown")

lookup_dict_encode_MOB_POSITION_SOURCE = {
    "Position estimated by the vessel" : 0,
    "Position reported by MOB emitter" : 1,
}
def lookup_encode_MOB_POSITION_SOURCE(value):
    result = lookup_dict_encode_MOB_POSITION_SOURCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from MOB_POSITION_SOURCE")
    return result

lookup_dict_STEERING_MODE = {
    0: "Main Steering",
    1: "Non-Follow-Up Device",
    2: "Follow-Up Device",
    3: "Heading Control Standalone",
    4: "Heading Control",
    5: "Track Control",
}
def lookup_STEERING_MODE(value):
    return lookup_dict_STEERING_MODE.get(value, "Unknown")

lookup_dict_encode_STEERING_MODE = {
    "Main Steering" : 0,
    "Non-Follow-Up Device" : 1,
    "Follow-Up Device" : 2,
    "Heading Control Standalone" : 3,
    "Heading Control" : 4,
    "Track Control" : 5,
}
def lookup_encode_STEERING_MODE(value):
    result = lookup_dict_encode_STEERING_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from STEERING_MODE")
    return result

lookup_dict_FUSION_RADIO_SOURCE = {
    0: "AM",
    1: "FM",
}
def lookup_FUSION_RADIO_SOURCE(value):
    return lookup_dict_FUSION_RADIO_SOURCE.get(value, "Unknown")

lookup_dict_encode_FUSION_RADIO_SOURCE = {
    "AM" : 0,
    "FM" : 1,
}
def lookup_encode_FUSION_RADIO_SOURCE(value):
    result = lookup_dict_encode_FUSION_RADIO_SOURCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from FUSION_RADIO_SOURCE")
    return result

lookup_dict_FUSION_REPLAY_MODE = {
    9: "USB repeat",
    10: "USB shuffle",
    12: "iPod repeat",
    13: "iPod shuffle",
}
def lookup_FUSION_REPLAY_MODE(value):
    return lookup_dict_FUSION_REPLAY_MODE.get(value, "Unknown")

lookup_dict_encode_FUSION_REPLAY_MODE = {
    "USB repeat" : 9,
    "USB shuffle" : 10,
    "iPod repeat" : 12,
    "iPod shuffle" : 13,
}
def lookup_encode_FUSION_REPLAY_MODE(value):
    result = lookup_dict_encode_FUSION_REPLAY_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from FUSION_REPLAY_MODE")
    return result

lookup_dict_FUSION_REPLAY_STATUS = {
    0: "Off",
    1: "One/track",
    2: "All/album",
}
def lookup_FUSION_REPLAY_STATUS(value):
    return lookup_dict_FUSION_REPLAY_STATUS.get(value, "Unknown")

lookup_dict_encode_FUSION_REPLAY_STATUS = {
    "Off" : 0,
    "One/track" : 1,
    "All/album" : 2,
}
def lookup_encode_FUSION_REPLAY_STATUS(value):
    result = lookup_dict_encode_FUSION_REPLAY_STATUS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from FUSION_REPLAY_STATUS")
    return result

lookup_dict_AIRMAR_POST_CONTROL = {
    0: "Report previous values",
    1: "Generate new values",
}
def lookup_AIRMAR_POST_CONTROL(value):
    return lookup_dict_AIRMAR_POST_CONTROL.get(value, "Unknown")

lookup_dict_encode_AIRMAR_POST_CONTROL = {
    "Report previous values" : 0,
    "Generate new values" : 1,
}
def lookup_encode_AIRMAR_POST_CONTROL(value):
    result = lookup_dict_encode_AIRMAR_POST_CONTROL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIRMAR_POST_CONTROL")
    return result

lookup_dict_AIRMAR_POST_ID = {
    1: "Format Code",
    2: "Factory EEPROM",
    3: "User EEPROM",
    4: "Water Temperature Sensor",
    5: "Sonar Transceiver",
    6: "Speed sensor",
    7: "Internal temperature sensor",
    8: "Battery voltage sensor",
}
def lookup_AIRMAR_POST_ID(value):
    return lookup_dict_AIRMAR_POST_ID.get(value, "Unknown")

lookup_dict_encode_AIRMAR_POST_ID = {
    "Format Code" : 1,
    "Factory EEPROM" : 2,
    "User EEPROM" : 3,
    "Water Temperature Sensor" : 4,
    "Sonar Transceiver" : 5,
    "Speed sensor" : 6,
    "Internal temperature sensor" : 7,
    "Battery voltage sensor" : 8,
}
def lookup_encode_AIRMAR_POST_ID(value):
    result = lookup_dict_encode_AIRMAR_POST_ID.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from AIRMAR_POST_ID")
    return result

lookup_dict_SONICHUB_TUNING = {
    1: "Seeking up",
    2: "Tuned",
    3: "Seeking down",
}
def lookup_SONICHUB_TUNING(value):
    return lookup_dict_SONICHUB_TUNING.get(value, "Unknown")

lookup_dict_encode_SONICHUB_TUNING = {
    "Seeking up" : 1,
    "Tuned" : 2,
    "Seeking down" : 3,
}
def lookup_encode_SONICHUB_TUNING(value):
    result = lookup_dict_encode_SONICHUB_TUNING.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SONICHUB_TUNING")
    return result

lookup_dict_SONICHUB_PLAYLIST = {
    1: "Report",
    4: "Next song",
    6: "Previous song",
}
def lookup_SONICHUB_PLAYLIST(value):
    return lookup_dict_SONICHUB_PLAYLIST.get(value, "Unknown")

lookup_dict_encode_SONICHUB_PLAYLIST = {
    "Report" : 1,
    "Next song" : 4,
    "Previous song" : 6,
}
def lookup_encode_SONICHUB_PLAYLIST(value):
    result = lookup_dict_encode_SONICHUB_PLAYLIST.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SONICHUB_PLAYLIST")
    return result

lookup_dict_FUSION_POWER_STATE = {
    1: "On",
    2: "Off",
}
def lookup_FUSION_POWER_STATE(value):
    return lookup_dict_FUSION_POWER_STATE.get(value, "Unknown")

lookup_dict_encode_FUSION_POWER_STATE = {
    "On" : 1,
    "Off" : 2,
}
def lookup_encode_FUSION_POWER_STATE(value):
    result = lookup_dict_encode_FUSION_POWER_STATE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from FUSION_POWER_STATE")
    return result

lookup_dict_PRIORITY = {
    0: "0",
    1: "1",
    2: "2",
    3: "3",
    4: "4",
    5: "5",
    6: "6",
    7: "7",
    8: "Leave unchanged",
    9: "Reset to default",
}
def lookup_PRIORITY(value):
    return lookup_dict_PRIORITY.get(value, "Unknown")

lookup_dict_encode_PRIORITY = {
    "0" : 0,
    "1" : 1,
    "2" : 2,
    "3" : 3,
    "4" : 4,
    "5" : 5,
    "6" : 6,
    "7" : 7,
    "Leave unchanged" : 8,
    "Reset to default" : 9,
}
def lookup_encode_PRIORITY(value):
    result = lookup_dict_encode_PRIORITY.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from PRIORITY")
    return result

lookup_dict_DEVICE_TEMP_STATE = {
    0: "Cold",
    1: "Warm",
    2: "Hot",
}
def lookup_DEVICE_TEMP_STATE(value):
    return lookup_dict_DEVICE_TEMP_STATE.get(value, "Unknown")

lookup_dict_encode_DEVICE_TEMP_STATE = {
    "Cold" : 0,
    "Warm" : 1,
    "Hot" : 2,
}
def lookup_encode_DEVICE_TEMP_STATE(value):
    result = lookup_dict_encode_DEVICE_TEMP_STATE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DEVICE_TEMP_STATE")
    return result

lookup_dict_BANDG_DECIMALS = {
    0: "0",
    1: "1",
    2: "2",
    3: "3",
    4: "4",
    254: "Auto",
}
def lookup_BANDG_DECIMALS(value):
    return lookup_dict_BANDG_DECIMALS.get(value, "Unknown")

lookup_dict_encode_BANDG_DECIMALS = {
    "0" : 0,
    "1" : 1,
    "2" : 2,
    "3" : 3,
    "4" : 4,
    "Auto" : 254,
}
def lookup_encode_BANDG_DECIMALS(value):
    result = lookup_dict_encode_BANDG_DECIMALS.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from BANDG_DECIMALS")
    return result

lookup_dict_GARMIN_COLOR_MODE = {
    0: "Day",
    1: "Night",
    13: "Color",
}
def lookup_GARMIN_COLOR_MODE(value):
    return lookup_dict_GARMIN_COLOR_MODE.get(value, "Unknown")

lookup_dict_encode_GARMIN_COLOR_MODE = {
    "Day" : 0,
    "Night" : 1,
    "Color" : 13,
}
def lookup_encode_GARMIN_COLOR_MODE(value):
    result = lookup_dict_encode_GARMIN_COLOR_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from GARMIN_COLOR_MODE")
    return result

lookup_dict_GARMIN_COLOR = {
    0: "Day full color",
    1: "Day high contrast",
    2: "Night full color",
    3: "Night red/black",
    4: "Night green/black",
}
def lookup_GARMIN_COLOR(value):
    return lookup_dict_GARMIN_COLOR.get(value, "Unknown")

lookup_dict_encode_GARMIN_COLOR = {
    "Day full color" : 0,
    "Day high contrast" : 1,
    "Night full color" : 2,
    "Night red/black" : 3,
    "Night green/black" : 4,
}
def lookup_encode_GARMIN_COLOR(value):
    result = lookup_dict_encode_GARMIN_COLOR.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from GARMIN_COLOR")
    return result

lookup_dict_GARMIN_BACKLIGHT_LEVEL = {
    0: "0%",
    1: "5%",
    2: "10%",
    3: "15%",
    4: "20%",
    5: "25%",
    6: "30%",
    7: "35%",
    8: "40%",
    9: "45%",
    10: "50%",
    11: "55%",
    12: "60%",
    13: "65%",
    14: "70%",
    15: "75%",
    16: "80%",
    17: "85%",
    18: "90%",
    19: "95%",
    20: "100%",
}
def lookup_GARMIN_BACKLIGHT_LEVEL(value):
    return lookup_dict_GARMIN_BACKLIGHT_LEVEL.get(value, "Unknown")

lookup_dict_encode_GARMIN_BACKLIGHT_LEVEL = {
    "0%" : 0,
    "5%" : 1,
    "10%" : 2,
    "15%" : 3,
    "20%" : 4,
    "25%" : 5,
    "30%" : 6,
    "35%" : 7,
    "40%" : 8,
    "45%" : 9,
    "50%" : 10,
    "55%" : 11,
    "60%" : 12,
    "65%" : 13,
    "70%" : 14,
    "75%" : 15,
    "80%" : 16,
    "85%" : 17,
    "90%" : 18,
    "95%" : 19,
    "100%" : 20,
}
def lookup_encode_GARMIN_BACKLIGHT_LEVEL(value):
    result = lookup_dict_encode_GARMIN_BACKLIGHT_LEVEL.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from GARMIN_BACKLIGHT_LEVEL")
    return result

lookup_dict_SEATALK_PILOT_MODE_16 = {
    0: "Standby",
    64: "Auto, compass commanded",
    256: "Vane, Wind Mode",
    384: "Track Mode",
    385: "No Drift, COG referenced (In track, course changes)",
}
def lookup_SEATALK_PILOT_MODE_16(value):
    return lookup_dict_SEATALK_PILOT_MODE_16.get(value, "Unknown")

lookup_dict_encode_SEATALK_PILOT_MODE_16 = {
    "Standby" : 0,
    "Auto, compass commanded" : 64,
    "Vane, Wind Mode" : 256,
    "Track Mode" : 384,
    "No Drift, COG referenced (In track, course changes)" : 385,
}
def lookup_encode_SEATALK_PILOT_MODE_16(value):
    result = lookup_dict_encode_SEATALK_PILOT_MODE_16.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SEATALK_PILOT_MODE_16")
    return result

lookup_dict_STATION_HEALTH = {
    0: "Not Working",
    1: "Unmonitored",
    2: "Healthy Operational",
    3: "Healthy Test Mode",
    4: "Test Mode",
}
def lookup_STATION_HEALTH(value):
    return lookup_dict_STATION_HEALTH.get(value, "Unknown")

lookup_dict_encode_STATION_HEALTH = {
    "Not Working" : 0,
    "Unmonitored" : 1,
    "Healthy Operational" : 2,
    "Healthy Test Mode" : 3,
    "Test Mode" : 4,
}
def lookup_encode_STATION_HEALTH(value):
    result = lookup_dict_encode_STATION_HEALTH.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from STATION_HEALTH")
    return result

lookup_dict_SERIAL_BIT_RATE = {
    0: "25",
    1: "50",
    2: "100",
    3: "200",
    4: "300",
    5: "600",
    6: "1200",
    7: "2400",
    8: "4800",
    9: "9600",
    10: "19200",
    11: "19200",
    12: "38400",
    13: "57600",
}
def lookup_SERIAL_BIT_RATE(value):
    return lookup_dict_SERIAL_BIT_RATE.get(value, "Unknown")

lookup_dict_encode_SERIAL_BIT_RATE = {
    "25" : 0,
    "50" : 1,
    "100" : 2,
    "200" : 3,
    "300" : 4,
    "600" : 5,
    "1200" : 6,
    "2400" : 7,
    "4800" : 8,
    "9600" : 9,
    "19200" : 10,
    "19200" : 11,
    "38400" : 12,
    "57600" : 13,
}
def lookup_encode_SERIAL_BIT_RATE(value):
    result = lookup_dict_encode_SERIAL_BIT_RATE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SERIAL_BIT_RATE")
    return result

lookup_dict_SERIAL_DETECTION_MODE = {
    0: "Auto bit rate",
    1: "Manual bit rate",
}
def lookup_SERIAL_DETECTION_MODE(value):
    return lookup_dict_SERIAL_DETECTION_MODE.get(value, "Unknown")

lookup_dict_encode_SERIAL_DETECTION_MODE = {
    "Auto bit rate" : 0,
    "Manual bit rate" : 1,
}
def lookup_encode_SERIAL_DETECTION_MODE(value):
    result = lookup_dict_encode_SERIAL_DETECTION_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from SERIAL_DETECTION_MODE")
    return result

lookup_dict_DIFFERENTIAL_SOURCE = {
    0: "Auto",
    1: "Loran",
    2: "MSK Beacon",
    3: "FM Subcarrier",
    4: "AIS",
    5: "Ground based radio",
    6: "SBAS",
    7: "Satellite",
}
def lookup_DIFFERENTIAL_SOURCE(value):
    return lookup_dict_DIFFERENTIAL_SOURCE.get(value, "Unknown")

lookup_dict_encode_DIFFERENTIAL_SOURCE = {
    "Auto" : 0,
    "Loran" : 1,
    "MSK Beacon" : 2,
    "FM Subcarrier" : 3,
    "AIS" : 4,
    "Ground based radio" : 5,
    "SBAS" : 6,
    "Satellite" : 7,
}
def lookup_encode_DIFFERENTIAL_SOURCE(value):
    result = lookup_dict_encode_DIFFERENTIAL_SOURCE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DIFFERENTIAL_SOURCE")
    return result

lookup_dict_DIFFERENTIAL_MODE = {
    0: "Manual",
    1: "Auto Power",
    2: "Auto Range",
}
def lookup_DIFFERENTIAL_MODE(value):
    return lookup_dict_DIFFERENTIAL_MODE.get(value, "Unknown")

lookup_dict_encode_DIFFERENTIAL_MODE = {
    "Manual" : 0,
    "Auto Power" : 1,
    "Auto Range" : 2,
}
def lookup_encode_DIFFERENTIAL_MODE(value):
    result = lookup_dict_encode_DIFFERENTIAL_MODE.get(value, None)
    if result is None:
        raise Exception(f"Cant encode this message, {value} is missing from DIFFERENTIAL_MODE")
    return result

def is_fast_pgn_59392() -> bool:
    """Return True if PGN 59392 is a fast PGN."""
    return False
def decode_pgn_59392(data_raw: int) -> NMEA2000Message:
    """Decode PGN 59392."""
    nmea2000Message = NMEA2000Message(59392, 'isoAcknowledgement', 'ISO Acknowledgement')
    # control | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 0) & 0xFF
    control = lookup_ISO_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # group_function | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    group_function_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    group_function = group_function_raw * 1 if group_function_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('group_function', 'Group Function', "", '', group_function, group_function_raw))

    # reserved_16 | Offset: 16, Length: 24, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFFFFFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # pgn | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 40) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "Parameter Group Number of requested information", '', pgn, pgn_raw))

    return nmea2000Message

def encode_pgn_59392(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 59392."""
    data_raw = 0
    # control | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ISO_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 0
    # group_function | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'group_function'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group Function'")
    data_raw |= (field_value & 0xFF) << 8
    # reserved_16 | Offset: 16, Length: 24, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFF) << 16
    # pgn | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    return data_raw


def is_fast_pgn_59904() -> bool:
    """Return True if PGN 59904 is a fast PGN."""
    return False
def decode_pgn_59904(data_raw: int) -> NMEA2000Message:
    """Decode PGN 59904."""
    nmea2000Message = NMEA2000Message(59904, 'isoRequest', 'ISO Request')
    # pgn | Offset: 0, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 0) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "", '', pgn, pgn_raw))

    return nmea2000Message

def encode_pgn_59904(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 59904."""
    data_raw = 0
    # pgn | Offset: 0, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 0
    return data_raw


def is_fast_pgn_60160() -> bool:
    """Return True if PGN 60160 is a fast PGN."""
    return False
def decode_pgn_60160(data_raw: int) -> NMEA2000Message:
    """Decode PGN 60160."""
    nmea2000Message = NMEA2000Message(60160, 'isoTransportProtocolDataTransfer', 'ISO Transport Protocol, Data Transfer')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # data | Offset: 8, Length: 56, Resolution: 1, Field Type: BINARY, Match: 
    data_raw = (data_raw >> 8) & 0xFFFFFFFFFFFFFF
    data = data_raw * 1 if data_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data', 'Data', "", '', data, data_raw))

    return nmea2000Message

def encode_pgn_60160(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 60160."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # data | Offset: 8, Length: 56, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFF) << 8
    return data_raw


def is_fast_pgn_60416() -> bool:
    """Return True if PGN 60416 is a fast PGN."""
    return False
# Complex PGN. number of matches: 5
def decode_pgn_60416(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0xFF) == 16)
        ):
        return decode_pgn_60416_isoTransportProtocolConnectionManagementRequestToSend(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0xFF) == 17)
        ):
        return decode_pgn_60416_isoTransportProtocolConnectionManagementClearToSend(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0xFF) == 19)
        ):
        return decode_pgn_60416_isoTransportProtocolConnectionManagementEndOfMessage(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0xFF) == 32)
        ):
        return decode_pgn_60416_isoTransportProtocolConnectionManagementBroadcastAnnounce(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0xFF) == 255)
        ):
        return decode_pgn_60416_isoTransportProtocolConnectionManagementAbort(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_60416_isoTransportProtocolConnectionManagementRequestToSend(data_raw: int) -> NMEA2000Message:
    """Decode PGN 60416."""
    nmea2000Message = NMEA2000Message(60416, 'isoTransportProtocolConnectionManagementRequestToSend', 'ISO Transport Protocol, Connection Management - Request To Send')
    # group_function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 16
    group_function_code_raw = (data_raw >> 0) & 0xFF
    group_function_code = lookup_ISO_COMMAND(group_function_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('group_function_code', 'Group Function Code', "RTS", '', group_function_code, group_function_code_raw))

    # message_size | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    message_size_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    message_size = message_size_raw * 1 if message_size_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('message_size', 'Message size', "bytes", '', message_size, message_size_raw))

    # packets | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    packets_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    packets = packets_raw * 1 if packets_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('packets', 'Packets', "packets", '', packets, packets_raw))

    # packets_reply | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    packets_reply_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    packets_reply = packets_reply_raw * 1 if packets_reply_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('packets_reply', 'Packets reply', "packets sent in response to CTS", '', packets_reply, packets_reply_raw))

    # pgn | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 40) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "", '', pgn, pgn_raw))

    return nmea2000Message

def encode_pgn_60416_isoTransportProtocolConnectionManagementRequestToSend(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 60416."""
    data_raw = 0
    # group_function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ISO_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'group_function_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group Function Code'")
    data_raw |= (field_value & 0xFF) << 0
    # message_size | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'message_size'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message size'")
    data_raw |= (field_value & 0xFFFF) << 8
    # packets | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'packets'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Packets'")
    data_raw |= (field_value & 0xFF) << 24
    # packets_reply | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'packets_reply'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Packets reply'")
    data_raw |= (field_value & 0xFF) << 32
    # pgn | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    return data_raw

def decode_pgn_60416_isoTransportProtocolConnectionManagementClearToSend(data_raw: int) -> NMEA2000Message:
    """Decode PGN 60416."""
    nmea2000Message = NMEA2000Message(60416, 'isoTransportProtocolConnectionManagementClearToSend', 'ISO Transport Protocol, Connection Management - Clear To Send')
    # group_function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 17
    group_function_code_raw = (data_raw >> 0) & 0xFF
    group_function_code = lookup_ISO_COMMAND(group_function_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('group_function_code', 'Group Function Code', "CTS", '', group_function_code, group_function_code_raw))

    # max_packets | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    max_packets_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    max_packets = max_packets_raw * 1 if max_packets_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('max_packets', 'Max packets', "Number of frames that can be sent before another CTS is required", '', max_packets, max_packets_raw))

    # next_sid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    next_sid_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    next_sid = next_sid_raw * 1 if next_sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('next_sid', 'Next SID', "Number of next frame to be transmitted", '', next_sid, next_sid_raw))

    # reserved_24 | Offset: 24, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_24_raw = (data_raw >> 24) & 0xFFFF
    reserved_24 = reserved_24_raw * 1 if reserved_24_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_24', 'Reserved', "", '', reserved_24, reserved_24_raw))

    # pgn | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 40) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "", '', pgn, pgn_raw))

    return nmea2000Message

def encode_pgn_60416_isoTransportProtocolConnectionManagementClearToSend(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 60416."""
    data_raw = 0
    # group_function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ISO_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'group_function_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group Function Code'")
    data_raw |= (field_value & 0xFF) << 0
    # max_packets | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'max_packets'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Max packets'")
    data_raw |= (field_value & 0xFF) << 8
    # next_sid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'next_sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Next SID'")
    data_raw |= (field_value & 0xFF) << 16
    # reserved_24 | Offset: 24, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_24'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 24
    # pgn | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    return data_raw

def decode_pgn_60416_isoTransportProtocolConnectionManagementEndOfMessage(data_raw: int) -> NMEA2000Message:
    """Decode PGN 60416."""
    nmea2000Message = NMEA2000Message(60416, 'isoTransportProtocolConnectionManagementEndOfMessage', 'ISO Transport Protocol, Connection Management - End Of Message')
    # group_function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 19
    group_function_code_raw = (data_raw >> 0) & 0xFF
    group_function_code = lookup_ISO_COMMAND(group_function_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('group_function_code', 'Group Function Code', "EOM", '', group_function_code, group_function_code_raw))

    # total_message_size | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    total_message_size_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    total_message_size = total_message_size_raw * 1 if total_message_size_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_message_size', 'Total message size', "bytes", '', total_message_size, total_message_size_raw))

    # total_number_of_frames_received | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    total_number_of_frames_received_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    total_number_of_frames_received = total_number_of_frames_received_raw * 1 if total_number_of_frames_received_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_number_of_frames_received', 'Total number of frames received', "Total number of of frames received", '', total_number_of_frames_received, total_number_of_frames_received_raw))

    # reserved_32 | Offset: 32, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_32_raw = (data_raw >> 32) & 0xFF
    reserved_32 = reserved_32_raw * 1 if reserved_32_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_32', 'Reserved', "", '', reserved_32, reserved_32_raw))

    # pgn | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 40) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "", '', pgn, pgn_raw))

    return nmea2000Message

def encode_pgn_60416_isoTransportProtocolConnectionManagementEndOfMessage(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 60416."""
    data_raw = 0
    # group_function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ISO_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'group_function_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group Function Code'")
    data_raw |= (field_value & 0xFF) << 0
    # total_message_size | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_message_size'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total message size'")
    data_raw |= (field_value & 0xFFFF) << 8
    # total_number_of_frames_received | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_number_of_frames_received'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total number of frames received'")
    data_raw |= (field_value & 0xFF) << 24
    # reserved_32 | Offset: 32, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_32'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 32
    # pgn | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    return data_raw

def decode_pgn_60416_isoTransportProtocolConnectionManagementBroadcastAnnounce(data_raw: int) -> NMEA2000Message:
    """Decode PGN 60416."""
    nmea2000Message = NMEA2000Message(60416, 'isoTransportProtocolConnectionManagementBroadcastAnnounce', 'ISO Transport Protocol, Connection Management - Broadcast Announce')
    # group_function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 32
    group_function_code_raw = (data_raw >> 0) & 0xFF
    group_function_code = lookup_ISO_COMMAND(group_function_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('group_function_code', 'Group Function Code', "BAM", '', group_function_code, group_function_code_raw))

    # message_size | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    message_size_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    message_size = message_size_raw * 1 if message_size_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('message_size', 'Message size', "bytes", '', message_size, message_size_raw))

    # packets | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    packets_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    packets = packets_raw * 1 if packets_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('packets', 'Packets', "frames", '', packets, packets_raw))

    # reserved_32 | Offset: 32, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_32_raw = (data_raw >> 32) & 0xFF
    reserved_32 = reserved_32_raw * 1 if reserved_32_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_32', 'Reserved', "", '', reserved_32, reserved_32_raw))

    # pgn | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 40) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "", '', pgn, pgn_raw))

    return nmea2000Message

def encode_pgn_60416_isoTransportProtocolConnectionManagementBroadcastAnnounce(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 60416."""
    data_raw = 0
    # group_function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ISO_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'group_function_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group Function Code'")
    data_raw |= (field_value & 0xFF) << 0
    # message_size | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'message_size'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message size'")
    data_raw |= (field_value & 0xFFFF) << 8
    # packets | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'packets'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Packets'")
    data_raw |= (field_value & 0xFF) << 24
    # reserved_32 | Offset: 32, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_32'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 32
    # pgn | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    return data_raw

def decode_pgn_60416_isoTransportProtocolConnectionManagementAbort(data_raw: int) -> NMEA2000Message:
    """Decode PGN 60416."""
    nmea2000Message = NMEA2000Message(60416, 'isoTransportProtocolConnectionManagementAbort', 'ISO Transport Protocol, Connection Management - Abort')
    # group_function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 255
    group_function_code_raw = (data_raw >> 0) & 0xFF
    group_function_code = lookup_ISO_COMMAND(group_function_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('group_function_code', 'Group Function Code', "Abort", '', group_function_code, group_function_code_raw))

    # reason | Offset: 8, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    reason_raw = (data_raw >> 8) & 0xFF
    reason = reason_raw * 1 if reason_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reason', 'Reason', "", '', reason, reason_raw))

    # reserved_16 | Offset: 16, Length: 24, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFFFFFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # pgn | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 40) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "", '', pgn, pgn_raw))

    return nmea2000Message

def encode_pgn_60416_isoTransportProtocolConnectionManagementAbort(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 60416."""
    data_raw = 0
    # group_function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ISO_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'group_function_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group Function Code'")
    data_raw |= (field_value & 0xFF) << 0
    # reason | Offset: 8, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reason'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reason'")
    data_raw |= (field_value & 0xFF) << 8
    # reserved_16 | Offset: 16, Length: 24, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFF) << 16
    # pgn | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    return data_raw


def is_fast_pgn_60928() -> bool:
    """Return True if PGN 60928 is a fast PGN."""
    return False
def decode_pgn_60928(data_raw: int) -> NMEA2000Message:
    """Decode PGN 60928."""
    nmea2000Message = NMEA2000Message(60928, 'isoAddressClaim', 'ISO Address Claim')
    # unique_number | Offset: 0, Length: 21, Resolution: 1, Field Type: NUMBER, Match: 
    unique_number_raw = decode_number((data_raw >> 0) & 0x1FFFFF, 21)
    unique_number = unique_number_raw * 1 if unique_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unique_number', 'Unique Number', "ISO Identity Number", '', unique_number, unique_number_raw))

    # manufacturer_code | Offset: 21, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 
    manufacturer_code_raw = (data_raw >> 21) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "", '', manufacturer_code, manufacturer_code_raw))

    # device_instance_lower | Offset: 32, Length: 3, Resolution: 1, Field Type: NUMBER, Match: 
    device_instance_lower_raw = decode_number((data_raw >> 32) & 0x7, 3)
    device_instance_lower = device_instance_lower_raw * 1 if device_instance_lower_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('device_instance_lower', 'Device Instance Lower', "ISO ECU Instance", '', device_instance_lower, device_instance_lower_raw))

    # device_instance_upper | Offset: 35, Length: 5, Resolution: 1, Field Type: NUMBER, Match: 
    device_instance_upper_raw = decode_number((data_raw >> 35) & 0x1F, 5)
    device_instance_upper = device_instance_upper_raw * 1 if device_instance_upper_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('device_instance_upper', 'Device Instance Upper', "ISO Function Instance", '', device_instance_upper, device_instance_upper_raw))

    # device_function | Offset: 40, Length: 8, Resolution: 1, Field Type: INDIRECT_LOOKUP, Match: 
    device_function_raw = (data_raw >> 40) & 0xFF
    device_function = device_function_raw * 1 if device_function_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('device_function', 'Device Function', "ISO Function", '', device_function, device_function_raw))

    # spare | Offset: 48, Length: 1, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 48) & 0x1
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # device_class | Offset: 49, Length: 7, Resolution: 1, Field Type: LOOKUP, Match: 
    device_class_raw = (data_raw >> 49) & 0x7F
    device_class = lookup_DEVICE_CLASS(device_class_raw)
    nmea2000Message.fields.append(NMEA2000Field('device_class', 'Device Class', "", '', device_class, device_class_raw))

    # system_instance | Offset: 56, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    system_instance_raw = decode_number((data_raw >> 56) & 0xF, 4)
    system_instance = system_instance_raw * 1 if system_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('system_instance', 'System Instance', "ISO Device Class Instance", '', system_instance, system_instance_raw))

    # industry_group | Offset: 60, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    industry_group_raw = (data_raw >> 60) & 0x7
    industry_group = lookup_INDUSTRY_CODE(industry_group_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_group', 'Industry Group', "", '', industry_group, industry_group_raw))

    # arbitrary_address_capable | Offset: 63, Length: 1, Resolution: 1, Field Type: NUMBER, Match: 
    arbitrary_address_capable_raw = decode_number((data_raw >> 63) & 0x1, 1)
    arbitrary_address_capable = arbitrary_address_capable_raw * 1 if arbitrary_address_capable_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('arbitrary_address_capable', 'Arbitrary address capable', "Field indicates whether the device is capable to claim arbitrary source address. Value is 1 for NMEA200 devices. Could be 0 for J1939 device claims", '', arbitrary_address_capable, arbitrary_address_capable_raw))

    return nmea2000Message

def encode_pgn_60928(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 60928."""
    data_raw = 0
    # unique_number | Offset: 0, Length: 21, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unique_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unique Number'")
    data_raw |= (field_value & 0x1FFFFF) << 0
    # manufacturer_code | Offset: 21, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 21
    # device_instance_lower | Offset: 32, Length: 3, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'device_instance_lower'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device Instance Lower'")
    data_raw |= (field_value & 0x7) << 32
    # device_instance_upper | Offset: 35, Length: 5, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'device_instance_upper'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device Instance Upper'")
    data_raw |= (field_value & 0x1F) << 35
    # device_function | Offset: 40, Length: 8, Resolution: 1, Field Type: INDIRECT_LOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'device_function'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device Function'")
    data_raw |= (field_value & 0xFF) << 40
    # spare | Offset: 48, Length: 1, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0x1) << 48
    # device_class | Offset: 49, Length: 7, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DEVICE_CLASS(f.value) for f in nmea2000Message.fields if f.id == 'device_class'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device Class'")
    data_raw |= (field_value & 0x7F) << 49
    # system_instance | Offset: 56, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'system_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'System Instance'")
    data_raw |= (field_value & 0xF) << 56
    # industry_group | Offset: 60, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_group'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Group'")
    data_raw |= (field_value & 0x7) << 60
    # arbitrary_address_capable | Offset: 63, Length: 1, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'arbitrary_address_capable'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Arbitrary address capable'")
    data_raw |= (field_value & 0x1) << 63
    return data_raw


def is_fast_pgn_61184() -> bool:
    """Return True if PGN 61184 is a fast PGN."""
    return False
# Complex PGN. number of matches: 3
def decode_pgn_61184(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1851) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 1)
        ):
        return decode_pgn_61184_seatalkWirelessKeypadLightControl(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1851) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_61184_seatalkWirelessKeypadControl(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 358) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_61184_victronBatteryRegister(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_61184_seatalkWirelessKeypadLightControl(data_raw: int) -> NMEA2000Message:
    """Decode PGN 61184."""
    nmea2000Message = NMEA2000Message(61184, 'seatalkWirelessKeypadLightControl', 'Seatalk: Wireless Keypad Light Control')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 1
    proprietary_id_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    proprietary_id = proprietary_id_raw * 1 if proprietary_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Wireless Keypad Light Control", '', proprietary_id, proprietary_id_raw))

    # variant | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    variant_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    variant = variant_raw * 1 if variant_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('variant', 'Variant', "", '', variant, variant_raw))

    # wireless_setting | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    wireless_setting_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    wireless_setting = wireless_setting_raw * 1 if wireless_setting_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wireless_setting', 'Wireless Setting', "", '', wireless_setting, wireless_setting_raw))

    # wired_setting | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    wired_setting_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    wired_setting = wired_setting_raw * 1 if wired_setting_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wired_setting', 'Wired Setting', "", '', wired_setting, wired_setting_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_61184_seatalkWirelessKeypadLightControl(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 61184."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # variant | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'variant'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Variant'")
    data_raw |= (field_value & 0xFF) << 24
    # wireless_setting | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wireless_setting'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wireless Setting'")
    data_raw |= (field_value & 0xFF) << 32
    # wired_setting | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wired_setting'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wired Setting'")
    data_raw |= (field_value & 0xFF) << 40
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw

def decode_pgn_61184_seatalkWirelessKeypadControl(data_raw: int) -> NMEA2000Message:
    """Decode PGN 61184."""
    nmea2000Message = NMEA2000Message(61184, 'seatalkWirelessKeypadControl', 'Seatalk: Wireless Keypad Control')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # pid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    pid_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    pid = pid_raw * 1 if pid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pid', 'PID', "", '', pid, pid_raw))

    # variant | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    variant_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    variant = variant_raw * 1 if variant_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('variant', 'Variant', "", '', variant, variant_raw))

    # beep_control | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    beep_control_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    beep_control = beep_control_raw * 1 if beep_control_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('beep_control', 'Beep Control', "", '', beep_control, beep_control_raw))

    # reserved_40 | Offset: 40, Length: 24, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0xFFFFFF
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    return nmea2000Message

def encode_pgn_61184_seatalkWirelessKeypadControl(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 61184."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # pid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PID'")
    data_raw |= (field_value & 0xFF) << 16
    # variant | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'variant'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Variant'")
    data_raw |= (field_value & 0xFF) << 24
    # beep_control | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'beep_control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Beep Control'")
    data_raw |= (field_value & 0xFF) << 32
    # reserved_40 | Offset: 40, Length: 24, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    return data_raw

def decode_pgn_61184_victronBatteryRegister(data_raw: int) -> NMEA2000Message:
    """Decode PGN 61184."""
    nmea2000Message = NMEA2000Message(61184, 'victronBatteryRegister', 'Victron Battery Register')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 358
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Victron Energy", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # register_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    register_id_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    register_id = register_id_raw * 1 if register_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('register_id', 'Register Id', "", '', register_id, register_id_raw))

    # payload | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    payload_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    payload = payload_raw * 1 if payload_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('payload', 'Payload', "", '', payload, payload_raw))

    return nmea2000Message

def encode_pgn_61184_victronBatteryRegister(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 61184."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # register_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'register_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Register Id'")
    data_raw |= (field_value & 0xFFFF) << 16
    # payload | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'payload'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Payload'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65001() -> bool:
    """Return True if PGN 65001 is a fast PGN."""
    return False
def decode_pgn_65001(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65001."""
    nmea2000Message = NMEA2000Message(65001, 'bus1PhaseCBasicAcQuantities', 'Bus #1 Phase C Basic AC Quantities')
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_line_ac_rms_voltage_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    line_line_ac_rms_voltage = line_line_ac_rms_voltage_raw * 1 if line_line_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_line_ac_rms_voltage', 'Line-Line AC RMS Voltage', "", 'V', line_line_ac_rms_voltage, line_line_ac_rms_voltage_raw))

    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_neutral_ac_rms_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    line_neutral_ac_rms_voltage = line_neutral_ac_rms_voltage_raw * 1 if line_neutral_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_neutral_ac_rms_voltage', 'Line-Neutral AC RMS Voltage', "", 'V', line_neutral_ac_rms_voltage, line_neutral_ac_rms_voltage_raw))

    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER, Match: 
    ac_frequency_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    ac_frequency = ac_frequency_raw * 0.0078125 if ac_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_frequency', 'AC Frequency', "", 'Hz', ac_frequency, ac_frequency_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_65001(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65001."""
    data_raw = 0
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_line_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Line AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 0
    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_neutral_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Neutral AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 16
    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Frequency'")        
    data_raw |= (int(field_value / 0.0078125) & 0xFFFF) << 32
    
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65002() -> bool:
    """Return True if PGN 65002 is a fast PGN."""
    return False
def decode_pgn_65002(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65002."""
    nmea2000Message = NMEA2000Message(65002, 'bus1PhaseBBasicAcQuantities', 'Bus #1 Phase B Basic AC Quantities')
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_line_ac_rms_voltage_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    line_line_ac_rms_voltage = line_line_ac_rms_voltage_raw * 1 if line_line_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_line_ac_rms_voltage', 'Line-Line AC RMS Voltage', "", 'V', line_line_ac_rms_voltage, line_line_ac_rms_voltage_raw))

    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_neutral_ac_rms_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    line_neutral_ac_rms_voltage = line_neutral_ac_rms_voltage_raw * 1 if line_neutral_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_neutral_ac_rms_voltage', 'Line-Neutral AC RMS Voltage', "", 'V', line_neutral_ac_rms_voltage, line_neutral_ac_rms_voltage_raw))

    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER, Match: 
    ac_frequency_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    ac_frequency = ac_frequency_raw * 0.0078125 if ac_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_frequency', 'AC Frequency', "", 'Hz', ac_frequency, ac_frequency_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_65002(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65002."""
    data_raw = 0
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_line_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Line AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 0
    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_neutral_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Neutral AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 16
    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Frequency'")        
    data_raw |= (int(field_value / 0.0078125) & 0xFFFF) << 32
    
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65003() -> bool:
    """Return True if PGN 65003 is a fast PGN."""
    return False
def decode_pgn_65003(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65003."""
    nmea2000Message = NMEA2000Message(65003, 'bus1PhaseABasicAcQuantities', 'Bus #1 Phase A Basic AC Quantities')
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_line_ac_rms_voltage_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    line_line_ac_rms_voltage = line_line_ac_rms_voltage_raw * 1 if line_line_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_line_ac_rms_voltage', 'Line-Line AC RMS Voltage', "", 'V', line_line_ac_rms_voltage, line_line_ac_rms_voltage_raw))

    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_neutral_ac_rms_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    line_neutral_ac_rms_voltage = line_neutral_ac_rms_voltage_raw * 1 if line_neutral_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_neutral_ac_rms_voltage', 'Line-Neutral AC RMS Voltage', "", 'V', line_neutral_ac_rms_voltage, line_neutral_ac_rms_voltage_raw))

    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER, Match: 
    ac_frequency_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    ac_frequency = ac_frequency_raw * 0.0078125 if ac_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_frequency', 'AC Frequency', "", 'Hz', ac_frequency, ac_frequency_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_65003(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65003."""
    data_raw = 0
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_line_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Line AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 0
    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_neutral_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Neutral AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 16
    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Frequency'")        
    data_raw |= (int(field_value / 0.0078125) & 0xFFFF) << 32
    
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65004() -> bool:
    """Return True if PGN 65004 is a fast PGN."""
    return False
def decode_pgn_65004(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65004."""
    nmea2000Message = NMEA2000Message(65004, 'bus1AverageBasicAcQuantities', 'Bus #1 Average Basic AC Quantities')
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_line_ac_rms_voltage_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    line_line_ac_rms_voltage = line_line_ac_rms_voltage_raw * 1 if line_line_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_line_ac_rms_voltage', 'Line-Line AC RMS Voltage', "", 'V', line_line_ac_rms_voltage, line_line_ac_rms_voltage_raw))

    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_neutral_ac_rms_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    line_neutral_ac_rms_voltage = line_neutral_ac_rms_voltage_raw * 1 if line_neutral_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_neutral_ac_rms_voltage', 'Line-Neutral AC RMS Voltage', "", 'V', line_neutral_ac_rms_voltage, line_neutral_ac_rms_voltage_raw))

    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER, Match: 
    ac_frequency_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    ac_frequency = ac_frequency_raw * 0.0078125 if ac_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_frequency', 'AC Frequency', "", 'Hz', ac_frequency, ac_frequency_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_65004(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65004."""
    data_raw = 0
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_line_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Line AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 0
    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_neutral_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Neutral AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 16
    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Frequency'")        
    data_raw |= (int(field_value / 0.0078125) & 0xFFFF) << 32
    
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65005() -> bool:
    """Return True if PGN 65005 is a fast PGN."""
    return False
def decode_pgn_65005(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65005."""
    nmea2000Message = NMEA2000Message(65005, 'utilityTotalAcEnergy', 'Utility Total AC Energy')
    # total_energy_export | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    total_energy_export_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    total_energy_export = total_energy_export_raw * 1 if total_energy_export_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_energy_export', 'Total Energy Export', "", 'kWh', total_energy_export, total_energy_export_raw))

    # total_energy_import | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    total_energy_import_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    total_energy_import = total_energy_import_raw * 1 if total_energy_import_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_energy_import', 'Total Energy Import', "", 'kWh', total_energy_import, total_energy_import_raw))

    return nmea2000Message

def encode_pgn_65005(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65005."""
    data_raw = 0
    # total_energy_export | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_energy_export'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total Energy Export'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # total_energy_import | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_energy_import'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total Energy Import'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65006() -> bool:
    """Return True if PGN 65006 is a fast PGN."""
    return False
def decode_pgn_65006(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65006."""
    nmea2000Message = NMEA2000Message(65006, 'utilityPhaseCAcReactivePower', 'Utility Phase C AC Reactive Power')
    # reactive_power | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    reactive_power_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    reactive_power = reactive_power_raw * 1 if reactive_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reactive_power', 'Reactive Power', "", 'VAR', reactive_power, reactive_power_raw))

    # power_factor | Offset: 16, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER, Match: 
    power_factor_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    power_factor = power_factor_raw * 6.10352e-05 if power_factor_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power_factor', 'Power factor', "", 'Cos Phi', power_factor, power_factor_raw))

    # power_factor_lagging | Offset: 32, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    power_factor_lagging_raw = (data_raw >> 32) & 0x3
    power_factor_lagging = lookup_POWER_FACTOR(power_factor_lagging_raw)
    nmea2000Message.fields.append(NMEA2000Field('power_factor_lagging', 'Power Factor Lagging', "", '', power_factor_lagging, power_factor_lagging_raw))

    # reserved_34 | Offset: 34, Length: 30, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_34_raw = (data_raw >> 34) & 0x3FFFFFFF
    reserved_34 = reserved_34_raw * 1 if reserved_34_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_34', 'Reserved', "", '', reserved_34, reserved_34_raw))

    return nmea2000Message

def encode_pgn_65006(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65006."""
    data_raw = 0
    # reactive_power | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reactive_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reactive Power'")
    data_raw |= (field_value & 0xFFFF) << 0
    # power_factor | Offset: 16, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power_factor'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power factor'")        
    data_raw |= (int(field_value / 6.10352e-05) & 0xFFFF) << 16
    
    # power_factor_lagging | Offset: 32, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POWER_FACTOR(f.value) for f in nmea2000Message.fields if f.id == 'power_factor_lagging'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power Factor Lagging'")
    data_raw |= (field_value & 0x3) << 32
    # reserved_34 | Offset: 34, Length: 30, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_34'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3FFFFFFF) << 34
    return data_raw


def is_fast_pgn_65007() -> bool:
    """Return True if PGN 65007 is a fast PGN."""
    return False
def decode_pgn_65007(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65007."""
    nmea2000Message = NMEA2000Message(65007, 'utilityPhaseCAcPower', 'Utility Phase C AC Power')
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    real_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if real_power_raw is not None and real_power_raw & (1 << (32 - 1)):
        real_power_raw -= (1 << 32)
    real_power = real_power_raw * 1 if real_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('real_power', 'Real Power', "", 'W', real_power, real_power_raw))

    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    apparent_power_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if apparent_power_raw is not None and apparent_power_raw & (1 << (32 - 1)):
        apparent_power_raw -= (1 << 32)
    apparent_power = apparent_power_raw * 1 if apparent_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('apparent_power', 'Apparent Power', "", 'VA', apparent_power, apparent_power_raw))

    return nmea2000Message

def encode_pgn_65007(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65007."""
    data_raw = 0
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'real_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Real Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'apparent_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Apparent Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65008() -> bool:
    """Return True if PGN 65008 is a fast PGN."""
    return False
def decode_pgn_65008(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65008."""
    nmea2000Message = NMEA2000Message(65008, 'utilityPhaseCBasicAcQuantities', 'Utility Phase C Basic AC Quantities')
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_line_ac_rms_voltage_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    line_line_ac_rms_voltage = line_line_ac_rms_voltage_raw * 1 if line_line_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_line_ac_rms_voltage', 'Line-Line AC RMS Voltage', "", 'V', line_line_ac_rms_voltage, line_line_ac_rms_voltage_raw))

    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_neutral_ac_rms_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    line_neutral_ac_rms_voltage = line_neutral_ac_rms_voltage_raw * 1 if line_neutral_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_neutral_ac_rms_voltage', 'Line-Neutral AC RMS Voltage', "", 'V', line_neutral_ac_rms_voltage, line_neutral_ac_rms_voltage_raw))

    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER, Match: 
    ac_frequency_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    ac_frequency = ac_frequency_raw * 0.0078125 if ac_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_frequency', 'AC Frequency', "", 'Hz', ac_frequency, ac_frequency_raw))

    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    ac_rms_current_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    ac_rms_current = ac_rms_current_raw * 1 if ac_rms_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_rms_current', 'AC RMS Current', "", 'A', ac_rms_current, ac_rms_current_raw))

    return nmea2000Message

def encode_pgn_65008(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65008."""
    data_raw = 0
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_line_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Line AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 0
    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_neutral_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Neutral AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 16
    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Frequency'")        
    data_raw |= (int(field_value / 0.0078125) & 0xFFFF) << 32
    
    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_rms_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC RMS Current'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65009() -> bool:
    """Return True if PGN 65009 is a fast PGN."""
    return False
def decode_pgn_65009(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65009."""
    nmea2000Message = NMEA2000Message(65009, 'utilityPhaseBAcReactivePower', 'Utility Phase B AC Reactive Power')
    # reactive_power | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    reactive_power_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    reactive_power = reactive_power_raw * 1 if reactive_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reactive_power', 'Reactive Power', "", 'VAR', reactive_power, reactive_power_raw))

    # power_factor | Offset: 16, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER, Match: 
    power_factor_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    power_factor = power_factor_raw * 6.10352e-05 if power_factor_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power_factor', 'Power factor', "", 'Cos Phi', power_factor, power_factor_raw))

    # power_factor_lagging | Offset: 32, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    power_factor_lagging_raw = (data_raw >> 32) & 0x3
    power_factor_lagging = lookup_POWER_FACTOR(power_factor_lagging_raw)
    nmea2000Message.fields.append(NMEA2000Field('power_factor_lagging', 'Power Factor Lagging', "", '', power_factor_lagging, power_factor_lagging_raw))

    # reserved_34 | Offset: 34, Length: 30, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_34_raw = (data_raw >> 34) & 0x3FFFFFFF
    reserved_34 = reserved_34_raw * 1 if reserved_34_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_34', 'Reserved', "", '', reserved_34, reserved_34_raw))

    return nmea2000Message

def encode_pgn_65009(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65009."""
    data_raw = 0
    # reactive_power | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reactive_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reactive Power'")
    data_raw |= (field_value & 0xFFFF) << 0
    # power_factor | Offset: 16, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power_factor'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power factor'")        
    data_raw |= (int(field_value / 6.10352e-05) & 0xFFFF) << 16
    
    # power_factor_lagging | Offset: 32, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POWER_FACTOR(f.value) for f in nmea2000Message.fields if f.id == 'power_factor_lagging'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power Factor Lagging'")
    data_raw |= (field_value & 0x3) << 32
    # reserved_34 | Offset: 34, Length: 30, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_34'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3FFFFFFF) << 34
    return data_raw


def is_fast_pgn_65010() -> bool:
    """Return True if PGN 65010 is a fast PGN."""
    return False
def decode_pgn_65010(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65010."""
    nmea2000Message = NMEA2000Message(65010, 'utilityPhaseBAcPower', 'Utility Phase B AC Power')
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    real_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if real_power_raw is not None and real_power_raw & (1 << (32 - 1)):
        real_power_raw -= (1 << 32)
    real_power = real_power_raw * 1 if real_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('real_power', 'Real Power', "", 'W', real_power, real_power_raw))

    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    apparent_power_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if apparent_power_raw is not None and apparent_power_raw & (1 << (32 - 1)):
        apparent_power_raw -= (1 << 32)
    apparent_power = apparent_power_raw * 1 if apparent_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('apparent_power', 'Apparent Power', "", 'VA', apparent_power, apparent_power_raw))

    return nmea2000Message

def encode_pgn_65010(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65010."""
    data_raw = 0
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'real_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Real Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'apparent_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Apparent Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65011() -> bool:
    """Return True if PGN 65011 is a fast PGN."""
    return False
def decode_pgn_65011(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65011."""
    nmea2000Message = NMEA2000Message(65011, 'utilityPhaseBBasicAcQuantities', 'Utility Phase B Basic AC Quantities')
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_line_ac_rms_voltage_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    line_line_ac_rms_voltage = line_line_ac_rms_voltage_raw * 1 if line_line_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_line_ac_rms_voltage', 'Line-Line AC RMS Voltage', "", 'V', line_line_ac_rms_voltage, line_line_ac_rms_voltage_raw))

    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_neutral_ac_rms_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    line_neutral_ac_rms_voltage = line_neutral_ac_rms_voltage_raw * 1 if line_neutral_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_neutral_ac_rms_voltage', 'Line-Neutral AC RMS Voltage', "", 'V', line_neutral_ac_rms_voltage, line_neutral_ac_rms_voltage_raw))

    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER, Match: 
    ac_frequency_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    ac_frequency = ac_frequency_raw * 0.0078125 if ac_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_frequency', 'AC Frequency', "", 'Hz', ac_frequency, ac_frequency_raw))

    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    ac_rms_current_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    ac_rms_current = ac_rms_current_raw * 1 if ac_rms_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_rms_current', 'AC RMS Current', "", 'A', ac_rms_current, ac_rms_current_raw))

    return nmea2000Message

def encode_pgn_65011(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65011."""
    data_raw = 0
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_line_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Line AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 0
    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_neutral_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Neutral AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 16
    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Frequency'")        
    data_raw |= (int(field_value / 0.0078125) & 0xFFFF) << 32
    
    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_rms_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC RMS Current'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65012() -> bool:
    """Return True if PGN 65012 is a fast PGN."""
    return False
def decode_pgn_65012(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65012."""
    nmea2000Message = NMEA2000Message(65012, 'utilityPhaseAAcReactivePower', 'Utility Phase A AC Reactive Power')
    # reactive_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    reactive_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if reactive_power_raw is not None and reactive_power_raw & (1 << (32 - 1)):
        reactive_power_raw -= (1 << 32)
    reactive_power = reactive_power_raw * 1 if reactive_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reactive_power', 'Reactive Power', "", 'VAR', reactive_power, reactive_power_raw))

    # power_factor | Offset: 32, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER, Match: 
    power_factor_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    power_factor = power_factor_raw * 6.10352e-05 if power_factor_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power_factor', 'Power factor', "", 'Cos Phi', power_factor, power_factor_raw))

    # power_factor_lagging | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    power_factor_lagging_raw = (data_raw >> 48) & 0x3
    power_factor_lagging = lookup_POWER_FACTOR(power_factor_lagging_raw)
    nmea2000Message.fields.append(NMEA2000Field('power_factor_lagging', 'Power Factor Lagging', "", '', power_factor_lagging, power_factor_lagging_raw))

    # reserved_50 | Offset: 50, Length: 14, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_50_raw = (data_raw >> 50) & 0x3FFF
    reserved_50 = reserved_50_raw * 1 if reserved_50_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_50', 'Reserved', "", '', reserved_50, reserved_50_raw))

    return nmea2000Message

def encode_pgn_65012(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65012."""
    data_raw = 0
    # reactive_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reactive_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reactive Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # power_factor | Offset: 32, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power_factor'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power factor'")        
    data_raw |= (int(field_value / 6.10352e-05) & 0xFFFF) << 32
    
    # power_factor_lagging | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POWER_FACTOR(f.value) for f in nmea2000Message.fields if f.id == 'power_factor_lagging'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power Factor Lagging'")
    data_raw |= (field_value & 0x3) << 48
    # reserved_50 | Offset: 50, Length: 14, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_50'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3FFF) << 50
    return data_raw


def is_fast_pgn_65013() -> bool:
    """Return True if PGN 65013 is a fast PGN."""
    return False
def decode_pgn_65013(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65013."""
    nmea2000Message = NMEA2000Message(65013, 'utilityPhaseAAcPower', 'Utility Phase A AC Power')
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    real_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if real_power_raw is not None and real_power_raw & (1 << (32 - 1)):
        real_power_raw -= (1 << 32)
    real_power = real_power_raw * 1 if real_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('real_power', 'Real Power', "", 'W', real_power, real_power_raw))

    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    apparent_power_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if apparent_power_raw is not None and apparent_power_raw & (1 << (32 - 1)):
        apparent_power_raw -= (1 << 32)
    apparent_power = apparent_power_raw * 1 if apparent_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('apparent_power', 'Apparent Power', "", 'VA', apparent_power, apparent_power_raw))

    return nmea2000Message

def encode_pgn_65013(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65013."""
    data_raw = 0
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'real_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Real Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'apparent_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Apparent Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65014() -> bool:
    """Return True if PGN 65014 is a fast PGN."""
    return False
def decode_pgn_65014(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65014."""
    nmea2000Message = NMEA2000Message(65014, 'utilityPhaseABasicAcQuantities', 'Utility Phase A Basic AC Quantities')
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_line_ac_rms_voltage_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    line_line_ac_rms_voltage = line_line_ac_rms_voltage_raw * 1 if line_line_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_line_ac_rms_voltage', 'Line-Line AC RMS Voltage', "", 'V', line_line_ac_rms_voltage, line_line_ac_rms_voltage_raw))

    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_neutral_ac_rms_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    line_neutral_ac_rms_voltage = line_neutral_ac_rms_voltage_raw * 1 if line_neutral_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_neutral_ac_rms_voltage', 'Line-Neutral AC RMS Voltage', "", 'V', line_neutral_ac_rms_voltage, line_neutral_ac_rms_voltage_raw))

    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER, Match: 
    ac_frequency_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    ac_frequency = ac_frequency_raw * 0.0078125 if ac_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_frequency', 'AC Frequency', "", 'Hz', ac_frequency, ac_frequency_raw))

    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    ac_rms_current_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    ac_rms_current = ac_rms_current_raw * 1 if ac_rms_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_rms_current', 'AC RMS Current', "", 'A', ac_rms_current, ac_rms_current_raw))

    return nmea2000Message

def encode_pgn_65014(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65014."""
    data_raw = 0
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_line_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Line AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 0
    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_neutral_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Neutral AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 16
    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Frequency'")        
    data_raw |= (int(field_value / 0.0078125) & 0xFFFF) << 32
    
    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_rms_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC RMS Current'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65015() -> bool:
    """Return True if PGN 65015 is a fast PGN."""
    return False
def decode_pgn_65015(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65015."""
    nmea2000Message = NMEA2000Message(65015, 'utilityTotalAcReactivePower', 'Utility Total AC Reactive Power')
    # reactive_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    reactive_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if reactive_power_raw is not None and reactive_power_raw & (1 << (32 - 1)):
        reactive_power_raw -= (1 << 32)
    reactive_power = reactive_power_raw * 1 if reactive_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reactive_power', 'Reactive Power', "", 'VAR', reactive_power, reactive_power_raw))

    # power_factor | Offset: 32, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER, Match: 
    power_factor_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    power_factor = power_factor_raw * 6.10352e-05 if power_factor_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power_factor', 'Power factor', "", 'Cos Phi', power_factor, power_factor_raw))

    # power_factor_lagging | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    power_factor_lagging_raw = (data_raw >> 48) & 0x3
    power_factor_lagging = lookup_POWER_FACTOR(power_factor_lagging_raw)
    nmea2000Message.fields.append(NMEA2000Field('power_factor_lagging', 'Power Factor Lagging', "", '', power_factor_lagging, power_factor_lagging_raw))

    # reserved_50 | Offset: 50, Length: 14, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_50_raw = (data_raw >> 50) & 0x3FFF
    reserved_50 = reserved_50_raw * 1 if reserved_50_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_50', 'Reserved', "", '', reserved_50, reserved_50_raw))

    return nmea2000Message

def encode_pgn_65015(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65015."""
    data_raw = 0
    # reactive_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reactive_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reactive Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # power_factor | Offset: 32, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power_factor'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power factor'")        
    data_raw |= (int(field_value / 6.10352e-05) & 0xFFFF) << 32
    
    # power_factor_lagging | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POWER_FACTOR(f.value) for f in nmea2000Message.fields if f.id == 'power_factor_lagging'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power Factor Lagging'")
    data_raw |= (field_value & 0x3) << 48
    # reserved_50 | Offset: 50, Length: 14, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_50'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3FFF) << 50
    return data_raw


def is_fast_pgn_65016() -> bool:
    """Return True if PGN 65016 is a fast PGN."""
    return False
def decode_pgn_65016(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65016."""
    nmea2000Message = NMEA2000Message(65016, 'utilityTotalAcPower', 'Utility Total AC Power')
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    real_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if real_power_raw is not None and real_power_raw & (1 << (32 - 1)):
        real_power_raw -= (1 << 32)
    real_power = real_power_raw * 1 if real_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('real_power', 'Real Power', "", 'W', real_power, real_power_raw))

    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    apparent_power_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if apparent_power_raw is not None and apparent_power_raw & (1 << (32 - 1)):
        apparent_power_raw -= (1 << 32)
    apparent_power = apparent_power_raw * 1 if apparent_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('apparent_power', 'Apparent Power', "", 'VA', apparent_power, apparent_power_raw))

    return nmea2000Message

def encode_pgn_65016(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65016."""
    data_raw = 0
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'real_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Real Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'apparent_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Apparent Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65017() -> bool:
    """Return True if PGN 65017 is a fast PGN."""
    return False
def decode_pgn_65017(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65017."""
    nmea2000Message = NMEA2000Message(65017, 'utilityAverageBasicAcQuantities', 'Utility Average Basic AC Quantities')
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_line_ac_rms_voltage_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    line_line_ac_rms_voltage = line_line_ac_rms_voltage_raw * 1 if line_line_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_line_ac_rms_voltage', 'Line-Line AC RMS Voltage', "", 'V', line_line_ac_rms_voltage, line_line_ac_rms_voltage_raw))

    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_neutral_ac_rms_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    line_neutral_ac_rms_voltage = line_neutral_ac_rms_voltage_raw * 1 if line_neutral_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_neutral_ac_rms_voltage', 'Line-Neutral AC RMS Voltage', "", 'V', line_neutral_ac_rms_voltage, line_neutral_ac_rms_voltage_raw))

    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER, Match: 
    ac_frequency_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    ac_frequency = ac_frequency_raw * 0.0078125 if ac_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_frequency', 'AC Frequency', "", 'Hz', ac_frequency, ac_frequency_raw))

    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    ac_rms_current_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    ac_rms_current = ac_rms_current_raw * 1 if ac_rms_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_rms_current', 'AC RMS Current', "", 'A', ac_rms_current, ac_rms_current_raw))

    return nmea2000Message

def encode_pgn_65017(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65017."""
    data_raw = 0
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_line_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Line AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 0
    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_neutral_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Neutral AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 16
    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Frequency'")        
    data_raw |= (int(field_value / 0.0078125) & 0xFFFF) << 32
    
    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_rms_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC RMS Current'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65018() -> bool:
    """Return True if PGN 65018 is a fast PGN."""
    return False
def decode_pgn_65018(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65018."""
    nmea2000Message = NMEA2000Message(65018, 'generatorTotalAcEnergy', 'Generator Total AC Energy')
    # total_energy_export | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    total_energy_export_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    total_energy_export = total_energy_export_raw * 1 if total_energy_export_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_energy_export', 'Total Energy Export', "", 'kWh', total_energy_export, total_energy_export_raw))

    # total_energy_import | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    total_energy_import_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    total_energy_import = total_energy_import_raw * 1 if total_energy_import_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_energy_import', 'Total Energy Import', "", 'kWh', total_energy_import, total_energy_import_raw))

    return nmea2000Message

def encode_pgn_65018(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65018."""
    data_raw = 0
    # total_energy_export | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_energy_export'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total Energy Export'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # total_energy_import | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_energy_import'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total Energy Import'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65019() -> bool:
    """Return True if PGN 65019 is a fast PGN."""
    return False
def decode_pgn_65019(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65019."""
    nmea2000Message = NMEA2000Message(65019, 'generatorPhaseCAcReactivePower', 'Generator Phase C AC Reactive Power')
    # reactive_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    reactive_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if reactive_power_raw is not None and reactive_power_raw & (1 << (32 - 1)):
        reactive_power_raw -= (1 << 32)
    reactive_power = reactive_power_raw * 1 if reactive_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reactive_power', 'Reactive Power', "", 'VAR', reactive_power, reactive_power_raw))

    # power_factor | Offset: 32, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER, Match: 
    power_factor_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    power_factor = power_factor_raw * 6.10352e-05 if power_factor_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power_factor', 'Power factor', "", 'Cos Phi', power_factor, power_factor_raw))

    # power_factor_lagging | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    power_factor_lagging_raw = (data_raw >> 48) & 0x3
    power_factor_lagging = lookup_POWER_FACTOR(power_factor_lagging_raw)
    nmea2000Message.fields.append(NMEA2000Field('power_factor_lagging', 'Power Factor Lagging', "", '', power_factor_lagging, power_factor_lagging_raw))

    # reserved_50 | Offset: 50, Length: 14, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_50_raw = (data_raw >> 50) & 0x3FFF
    reserved_50 = reserved_50_raw * 1 if reserved_50_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_50', 'Reserved', "", '', reserved_50, reserved_50_raw))

    return nmea2000Message

def encode_pgn_65019(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65019."""
    data_raw = 0
    # reactive_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reactive_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reactive Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # power_factor | Offset: 32, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power_factor'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power factor'")        
    data_raw |= (int(field_value / 6.10352e-05) & 0xFFFF) << 32
    
    # power_factor_lagging | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POWER_FACTOR(f.value) for f in nmea2000Message.fields if f.id == 'power_factor_lagging'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power Factor Lagging'")
    data_raw |= (field_value & 0x3) << 48
    # reserved_50 | Offset: 50, Length: 14, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_50'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3FFF) << 50
    return data_raw


def is_fast_pgn_65020() -> bool:
    """Return True if PGN 65020 is a fast PGN."""
    return False
def decode_pgn_65020(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65020."""
    nmea2000Message = NMEA2000Message(65020, 'generatorPhaseCAcPower', 'Generator Phase C AC Power')
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    real_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if real_power_raw is not None and real_power_raw & (1 << (32 - 1)):
        real_power_raw -= (1 << 32)
    real_power = real_power_raw * 1 if real_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('real_power', 'Real Power', "", 'W', real_power, real_power_raw))

    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    apparent_power_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if apparent_power_raw is not None and apparent_power_raw & (1 << (32 - 1)):
        apparent_power_raw -= (1 << 32)
    apparent_power = apparent_power_raw * 1 if apparent_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('apparent_power', 'Apparent Power', "", 'VAR', apparent_power, apparent_power_raw))

    return nmea2000Message

def encode_pgn_65020(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65020."""
    data_raw = 0
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'real_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Real Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'apparent_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Apparent Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65021() -> bool:
    """Return True if PGN 65021 is a fast PGN."""
    return False
def decode_pgn_65021(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65021."""
    nmea2000Message = NMEA2000Message(65021, 'generatorPhaseCBasicAcQuantities', 'Generator Phase C Basic AC Quantities')
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_line_ac_rms_voltage_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    line_line_ac_rms_voltage = line_line_ac_rms_voltage_raw * 1 if line_line_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_line_ac_rms_voltage', 'Line-Line AC RMS Voltage', "", 'V', line_line_ac_rms_voltage, line_line_ac_rms_voltage_raw))

    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_neutral_ac_rms_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    line_neutral_ac_rms_voltage = line_neutral_ac_rms_voltage_raw * 1 if line_neutral_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_neutral_ac_rms_voltage', 'Line-Neutral AC RMS Voltage', "", 'V', line_neutral_ac_rms_voltage, line_neutral_ac_rms_voltage_raw))

    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER, Match: 
    ac_frequency_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    ac_frequency = ac_frequency_raw * 0.0078125 if ac_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_frequency', 'AC Frequency', "", 'Hz', ac_frequency, ac_frequency_raw))

    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    ac_rms_current_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    ac_rms_current = ac_rms_current_raw * 1 if ac_rms_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_rms_current', 'AC RMS Current', "", 'A', ac_rms_current, ac_rms_current_raw))

    return nmea2000Message

def encode_pgn_65021(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65021."""
    data_raw = 0
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_line_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Line AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 0
    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_neutral_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Neutral AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 16
    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Frequency'")        
    data_raw |= (int(field_value / 0.0078125) & 0xFFFF) << 32
    
    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_rms_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC RMS Current'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65022() -> bool:
    """Return True if PGN 65022 is a fast PGN."""
    return False
def decode_pgn_65022(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65022."""
    nmea2000Message = NMEA2000Message(65022, 'generatorPhaseBAcReactivePower', 'Generator Phase B AC Reactive Power')
    # reactive_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    reactive_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if reactive_power_raw is not None and reactive_power_raw & (1 << (32 - 1)):
        reactive_power_raw -= (1 << 32)
    reactive_power = reactive_power_raw * 1 if reactive_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reactive_power', 'Reactive Power', "", 'VAR', reactive_power, reactive_power_raw))

    # power_factor | Offset: 32, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER, Match: 
    power_factor_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    power_factor = power_factor_raw * 6.10352e-05 if power_factor_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power_factor', 'Power factor', "", 'Cos Phi', power_factor, power_factor_raw))

    # power_factor_lagging | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    power_factor_lagging_raw = (data_raw >> 48) & 0x3
    power_factor_lagging = lookup_POWER_FACTOR(power_factor_lagging_raw)
    nmea2000Message.fields.append(NMEA2000Field('power_factor_lagging', 'Power Factor Lagging', "", '', power_factor_lagging, power_factor_lagging_raw))

    # reserved_50 | Offset: 50, Length: 14, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_50_raw = (data_raw >> 50) & 0x3FFF
    reserved_50 = reserved_50_raw * 1 if reserved_50_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_50', 'Reserved', "", '', reserved_50, reserved_50_raw))

    return nmea2000Message

def encode_pgn_65022(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65022."""
    data_raw = 0
    # reactive_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reactive_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reactive Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # power_factor | Offset: 32, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power_factor'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power factor'")        
    data_raw |= (int(field_value / 6.10352e-05) & 0xFFFF) << 32
    
    # power_factor_lagging | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POWER_FACTOR(f.value) for f in nmea2000Message.fields if f.id == 'power_factor_lagging'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power Factor Lagging'")
    data_raw |= (field_value & 0x3) << 48
    # reserved_50 | Offset: 50, Length: 14, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_50'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3FFF) << 50
    return data_raw


def is_fast_pgn_65023() -> bool:
    """Return True if PGN 65023 is a fast PGN."""
    return False
def decode_pgn_65023(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65023."""
    nmea2000Message = NMEA2000Message(65023, 'generatorPhaseBAcPower', 'Generator Phase B AC Power')
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    real_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if real_power_raw is not None and real_power_raw & (1 << (32 - 1)):
        real_power_raw -= (1 << 32)
    real_power = real_power_raw * 1 if real_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('real_power', 'Real Power', "", 'W', real_power, real_power_raw))

    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    apparent_power_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if apparent_power_raw is not None and apparent_power_raw & (1 << (32 - 1)):
        apparent_power_raw -= (1 << 32)
    apparent_power = apparent_power_raw * 1 if apparent_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('apparent_power', 'Apparent Power', "", 'VA', apparent_power, apparent_power_raw))

    return nmea2000Message

def encode_pgn_65023(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65023."""
    data_raw = 0
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'real_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Real Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'apparent_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Apparent Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65024() -> bool:
    """Return True if PGN 65024 is a fast PGN."""
    return False
def decode_pgn_65024(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65024."""
    nmea2000Message = NMEA2000Message(65024, 'generatorPhaseBBasicAcQuantities', 'Generator Phase B Basic AC Quantities')
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_line_ac_rms_voltage_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    line_line_ac_rms_voltage = line_line_ac_rms_voltage_raw * 1 if line_line_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_line_ac_rms_voltage', 'Line-Line AC RMS Voltage', "", 'V', line_line_ac_rms_voltage, line_line_ac_rms_voltage_raw))

    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_neutral_ac_rms_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    line_neutral_ac_rms_voltage = line_neutral_ac_rms_voltage_raw * 1 if line_neutral_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_neutral_ac_rms_voltage', 'Line-Neutral AC RMS Voltage', "", 'V', line_neutral_ac_rms_voltage, line_neutral_ac_rms_voltage_raw))

    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER, Match: 
    ac_frequency_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    ac_frequency = ac_frequency_raw * 0.0078125 if ac_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_frequency', 'AC Frequency', "", 'Hz', ac_frequency, ac_frequency_raw))

    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    ac_rms_current_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    ac_rms_current = ac_rms_current_raw * 1 if ac_rms_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_rms_current', 'AC RMS Current', "", 'A', ac_rms_current, ac_rms_current_raw))

    return nmea2000Message

def encode_pgn_65024(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65024."""
    data_raw = 0
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_line_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Line AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 0
    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_neutral_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Neutral AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 16
    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Frequency'")        
    data_raw |= (int(field_value / 0.0078125) & 0xFFFF) << 32
    
    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_rms_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC RMS Current'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65025() -> bool:
    """Return True if PGN 65025 is a fast PGN."""
    return False
def decode_pgn_65025(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65025."""
    nmea2000Message = NMEA2000Message(65025, 'generatorPhaseAAcReactivePower', 'Generator Phase A AC Reactive Power')
    # reactive_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    reactive_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if reactive_power_raw is not None and reactive_power_raw & (1 << (32 - 1)):
        reactive_power_raw -= (1 << 32)
    reactive_power = reactive_power_raw * 1 if reactive_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reactive_power', 'Reactive Power', "", 'VAR', reactive_power, reactive_power_raw))

    # power_factor | Offset: 32, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER, Match: 
    power_factor_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    power_factor = power_factor_raw * 6.10352e-05 if power_factor_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power_factor', 'Power factor', "", 'Cos Phi', power_factor, power_factor_raw))

    # power_factor_lagging | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    power_factor_lagging_raw = (data_raw >> 48) & 0x3
    power_factor_lagging = lookup_POWER_FACTOR(power_factor_lagging_raw)
    nmea2000Message.fields.append(NMEA2000Field('power_factor_lagging', 'Power Factor Lagging', "", '', power_factor_lagging, power_factor_lagging_raw))

    # reserved_50 | Offset: 50, Length: 14, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_50_raw = (data_raw >> 50) & 0x3FFF
    reserved_50 = reserved_50_raw * 1 if reserved_50_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_50', 'Reserved', "", '', reserved_50, reserved_50_raw))

    return nmea2000Message

def encode_pgn_65025(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65025."""
    data_raw = 0
    # reactive_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reactive_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reactive Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # power_factor | Offset: 32, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power_factor'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power factor'")        
    data_raw |= (int(field_value / 6.10352e-05) & 0xFFFF) << 32
    
    # power_factor_lagging | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POWER_FACTOR(f.value) for f in nmea2000Message.fields if f.id == 'power_factor_lagging'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power Factor Lagging'")
    data_raw |= (field_value & 0x3) << 48
    # reserved_50 | Offset: 50, Length: 14, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_50'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3FFF) << 50
    return data_raw


def is_fast_pgn_65026() -> bool:
    """Return True if PGN 65026 is a fast PGN."""
    return False
def decode_pgn_65026(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65026."""
    nmea2000Message = NMEA2000Message(65026, 'generatorPhaseAAcPower', 'Generator Phase A AC Power')
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    real_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if real_power_raw is not None and real_power_raw & (1 << (32 - 1)):
        real_power_raw -= (1 << 32)
    real_power = real_power_raw * 1 if real_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('real_power', 'Real Power', "", 'W', real_power, real_power_raw))

    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    apparent_power_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if apparent_power_raw is not None and apparent_power_raw & (1 << (32 - 1)):
        apparent_power_raw -= (1 << 32)
    apparent_power = apparent_power_raw * 1 if apparent_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('apparent_power', 'Apparent Power', "", 'VA', apparent_power, apparent_power_raw))

    return nmea2000Message

def encode_pgn_65026(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65026."""
    data_raw = 0
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'real_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Real Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'apparent_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Apparent Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65027() -> bool:
    """Return True if PGN 65027 is a fast PGN."""
    return False
def decode_pgn_65027(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65027."""
    nmea2000Message = NMEA2000Message(65027, 'generatorPhaseABasicAcQuantities', 'Generator Phase A Basic AC Quantities')
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_line_ac_rms_voltage_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    line_line_ac_rms_voltage = line_line_ac_rms_voltage_raw * 1 if line_line_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_line_ac_rms_voltage', 'Line-Line AC RMS Voltage', "", 'V', line_line_ac_rms_voltage, line_line_ac_rms_voltage_raw))

    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_neutral_ac_rms_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    line_neutral_ac_rms_voltage = line_neutral_ac_rms_voltage_raw * 1 if line_neutral_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_neutral_ac_rms_voltage', 'Line-Neutral AC RMS Voltage', "", 'V', line_neutral_ac_rms_voltage, line_neutral_ac_rms_voltage_raw))

    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER, Match: 
    ac_frequency_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    ac_frequency = ac_frequency_raw * 0.0078125 if ac_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_frequency', 'AC Frequency', "", 'Hz', ac_frequency, ac_frequency_raw))

    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    ac_rms_current_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    ac_rms_current = ac_rms_current_raw * 1 if ac_rms_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_rms_current', 'AC RMS Current', "", 'A', ac_rms_current, ac_rms_current_raw))

    return nmea2000Message

def encode_pgn_65027(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65027."""
    data_raw = 0
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_line_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Line AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 0
    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_neutral_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Neutral AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 16
    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Frequency'")        
    data_raw |= (int(field_value / 0.0078125) & 0xFFFF) << 32
    
    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_rms_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC RMS Current'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65028() -> bool:
    """Return True if PGN 65028 is a fast PGN."""
    return False
def decode_pgn_65028(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65028."""
    nmea2000Message = NMEA2000Message(65028, 'generatorTotalAcReactivePower', 'Generator Total AC Reactive Power')
    # reactive_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    reactive_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if reactive_power_raw is not None and reactive_power_raw & (1 << (32 - 1)):
        reactive_power_raw -= (1 << 32)
    reactive_power = reactive_power_raw * 1 if reactive_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reactive_power', 'Reactive Power', "", 'VAR', reactive_power, reactive_power_raw))

    # power_factor | Offset: 32, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER, Match: 
    power_factor_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    power_factor = power_factor_raw * 6.10352e-05 if power_factor_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power_factor', 'Power factor', "", 'Cos Phi', power_factor, power_factor_raw))

    # power_factor_lagging | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    power_factor_lagging_raw = (data_raw >> 48) & 0x3
    power_factor_lagging = lookup_POWER_FACTOR(power_factor_lagging_raw)
    nmea2000Message.fields.append(NMEA2000Field('power_factor_lagging', 'Power Factor Lagging', "", '', power_factor_lagging, power_factor_lagging_raw))

    # reserved_50 | Offset: 50, Length: 14, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_50_raw = (data_raw >> 50) & 0x3FFF
    reserved_50 = reserved_50_raw * 1 if reserved_50_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_50', 'Reserved', "", '', reserved_50, reserved_50_raw))

    return nmea2000Message

def encode_pgn_65028(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65028."""
    data_raw = 0
    # reactive_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reactive_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reactive Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # power_factor | Offset: 32, Length: 16, Resolution: 6.10352e-05, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power_factor'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power factor'")        
    data_raw |= (int(field_value / 6.10352e-05) & 0xFFFF) << 32
    
    # power_factor_lagging | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POWER_FACTOR(f.value) for f in nmea2000Message.fields if f.id == 'power_factor_lagging'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power Factor Lagging'")
    data_raw |= (field_value & 0x3) << 48
    # reserved_50 | Offset: 50, Length: 14, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_50'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3FFF) << 50
    return data_raw


def is_fast_pgn_65029() -> bool:
    """Return True if PGN 65029 is a fast PGN."""
    return False
def decode_pgn_65029(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65029."""
    nmea2000Message = NMEA2000Message(65029, 'generatorTotalAcPower', 'Generator Total AC Power')
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    real_power_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if real_power_raw is not None and real_power_raw & (1 << (32 - 1)):
        real_power_raw -= (1 << 32)
    real_power = real_power_raw * 1 if real_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('real_power', 'Real Power', "", 'W', real_power, real_power_raw))

    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    apparent_power_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if apparent_power_raw is not None and apparent_power_raw & (1 << (32 - 1)):
        apparent_power_raw -= (1 << 32)
    apparent_power = apparent_power_raw * 1 if apparent_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('apparent_power', 'Apparent Power', "", 'VA', apparent_power, apparent_power_raw))

    return nmea2000Message

def encode_pgn_65029(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65029."""
    data_raw = 0
    # real_power | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'real_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Real Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # apparent_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'apparent_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Apparent Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65030() -> bool:
    """Return True if PGN 65030 is a fast PGN."""
    return False
def decode_pgn_65030(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65030."""
    nmea2000Message = NMEA2000Message(65030, 'generatorAverageBasicAcQuantities', 'Generator Average Basic AC Quantities')
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_line_ac_rms_voltage_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    line_line_ac_rms_voltage = line_line_ac_rms_voltage_raw * 1 if line_line_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_line_ac_rms_voltage', 'Line-Line AC RMS Voltage', "", 'V', line_line_ac_rms_voltage, line_line_ac_rms_voltage_raw))

    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    line_neutral_ac_rms_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    line_neutral_ac_rms_voltage = line_neutral_ac_rms_voltage_raw * 1 if line_neutral_ac_rms_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line_neutral_ac_rms_voltage', 'Line-Neutral AC RMS Voltage', "", 'V', line_neutral_ac_rms_voltage, line_neutral_ac_rms_voltage_raw))

    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER, Match: 
    ac_frequency_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    ac_frequency = ac_frequency_raw * 0.0078125 if ac_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_frequency', 'AC Frequency', "", 'Hz', ac_frequency, ac_frequency_raw))

    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    ac_rms_current_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    ac_rms_current = ac_rms_current_raw * 1 if ac_rms_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_rms_current', 'AC RMS Current', "", 'A', ac_rms_current, ac_rms_current_raw))

    return nmea2000Message

def encode_pgn_65030(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65030."""
    data_raw = 0
    # line_line_ac_rms_voltage | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_line_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Line AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 0
    # line_neutral_ac_rms_voltage | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line_neutral_ac_rms_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line-Neutral AC RMS Voltage'")
    data_raw |= (field_value & 0xFFFF) << 16
    # ac_frequency | Offset: 32, Length: 16, Resolution: 0.0078125, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Frequency'")        
    data_raw |= (int(field_value / 0.0078125) & 0xFFFF) << 32
    
    # ac_rms_current | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_rms_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC RMS Current'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65240() -> bool:
    """Return True if PGN 65240 is a fast PGN."""
    raise Exception('PGEN type ISO not supported')

def decode_pgn_65240(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65240."""
    nmea2000Message = NMEA2000Message(65240, 'isoCommandedAddress', 'ISO Commanded Address')
    # unique_number | Offset: 0, Length: 21, Resolution: 1, Field Type: BINARY, Match: 
    unique_number_raw = (data_raw >> 0) & 0x1FFFFF
    unique_number = unique_number_raw * 1 if unique_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unique_number', 'Unique Number', "ISO Identity Number", '', unique_number, unique_number_raw))

    # manufacturer_code | Offset: 21, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 
    manufacturer_code_raw = (data_raw >> 21) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "", 'Manufacturer Code', manufacturer_code, manufacturer_code_raw))

    # device_instance_lower | Offset: 32, Length: 3, Resolution: 1, Field Type: NUMBER, Match: 
    device_instance_lower_raw = decode_number((data_raw >> 32) & 0x7, 3)
    device_instance_lower = device_instance_lower_raw * 1 if device_instance_lower_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('device_instance_lower', 'Device Instance Lower', "ISO ECU Instance", '', device_instance_lower, device_instance_lower_raw))

    # device_instance_upper | Offset: 35, Length: 5, Resolution: 1, Field Type: NUMBER, Match: 
    device_instance_upper_raw = decode_number((data_raw >> 35) & 0x1F, 5)
    device_instance_upper = device_instance_upper_raw * 1 if device_instance_upper_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('device_instance_upper', 'Device Instance Upper', "ISO Function Instance", '', device_instance_upper, device_instance_upper_raw))

    # device_function | Offset: 40, Length: 8, Resolution: 1, Field Type: INDIRECT_LOOKUP, Match: 
    device_function_raw = (data_raw >> 40) & 0xFF
    device_function = device_function_raw * 1 if device_function_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('device_function', 'Device Function', "ISO Function", '', device_function, device_function_raw))

    # reserved_48 | Offset: 48, Length: 1, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0x1
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    # device_class | Offset: 49, Length: 7, Resolution: 1, Field Type: LOOKUP, Match: 
    device_class_raw = (data_raw >> 49) & 0x7F
    device_class = lookup_DEVICE_CLASS(device_class_raw)
    nmea2000Message.fields.append(NMEA2000Field('device_class', 'Device Class', "", '', device_class, device_class_raw))

    # system_instance | Offset: 56, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    system_instance_raw = decode_number((data_raw >> 56) & 0xF, 4)
    system_instance = system_instance_raw * 1 if system_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('system_instance', 'System Instance', "ISO Device Class Instance", '', system_instance, system_instance_raw))

    # industry_code | Offset: 60, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    industry_code_raw = (data_raw >> 60) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "", '', industry_code, industry_code_raw))

    # reserved_63 | Offset: 63, Length: 1, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_63_raw = (data_raw >> 63) & 0x1
    reserved_63 = reserved_63_raw * 1 if reserved_63_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_63', 'Reserved', "", '', reserved_63, reserved_63_raw))

    # new_source_address | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    new_source_address_raw = decode_number((data_raw >> 64) & 0xFF, 8)
    new_source_address = new_source_address_raw * 1 if new_source_address_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('new_source_address', 'New Source Address', "", '', new_source_address, new_source_address_raw))

    return nmea2000Message

def encode_pgn_65240(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65240."""
    data_raw = 0
    # unique_number | Offset: 0, Length: 21, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unique_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unique Number'")
    data_raw |= (field_value & 0x1FFFFF) << 0
    # manufacturer_code | Offset: 21, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 21
    # device_instance_lower | Offset: 32, Length: 3, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'device_instance_lower'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device Instance Lower'")
    data_raw |= (field_value & 0x7) << 32
    # device_instance_upper | Offset: 35, Length: 5, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'device_instance_upper'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device Instance Upper'")
    data_raw |= (field_value & 0x1F) << 35
    # device_function | Offset: 40, Length: 8, Resolution: 1, Field Type: INDIRECT_LOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'device_function'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device Function'")
    data_raw |= (field_value & 0xFF) << 40
    # reserved_48 | Offset: 48, Length: 1, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1) << 48
    # device_class | Offset: 49, Length: 7, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DEVICE_CLASS(f.value) for f in nmea2000Message.fields if f.id == 'device_class'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device Class'")
    data_raw |= (field_value & 0x7F) << 49
    # system_instance | Offset: 56, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'system_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'System Instance'")
    data_raw |= (field_value & 0xF) << 56
    # industry_code | Offset: 60, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 60
    # reserved_63 | Offset: 63, Length: 1, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_63'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1) << 63
    # new_source_address | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'new_source_address'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'New Source Address'")
    data_raw |= (field_value & 0xFF) << 64
    return data_raw


def is_fast_pgn_65280() -> bool:
    """Return True if PGN 65280 is a fast PGN."""
    return False
def decode_pgn_65280(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65280."""
    nmea2000Message = NMEA2000Message(65280, 'furunoHeave', 'Furuno: Heave')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1855
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Furuno", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # heave | Offset: 16, Length: 32, Resolution: 0.001, Field Type: NUMBER, Match: 
    heave_raw = decode_number((data_raw >> 16) & 0xFFFFFFFF, 32)
    if heave_raw is not None and heave_raw & (1 << (32 - 1)):
        heave_raw -= (1 << 32)
    heave = heave_raw * 0.001 if heave_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('heave', 'Heave', "", 'm', heave, heave_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_65280(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65280."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # heave | Offset: 16, Length: 32, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'heave'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Heave'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFFFF) << 16
    
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65284() -> bool:
    """Return True if PGN 65284 is a fast PGN."""
    return False
def decode_pgn_65284(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65284."""
    nmea2000Message = NMEA2000Message(65284, 'maretronProprietaryDcBreakerCurrent', 'Maretron: Proprietary DC Breaker Current')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 137
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Maretron", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # bank_instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    bank_instance_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    bank_instance = bank_instance_raw * 1 if bank_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('bank_instance', 'Bank Instance', "", '', bank_instance, bank_instance_raw))

    # indicator_number | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    indicator_number_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    indicator_number = indicator_number_raw * 1 if indicator_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('indicator_number', 'Indicator Number', "", '', indicator_number, indicator_number_raw))

    # breaker_current | Offset: 32, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    breaker_current_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    breaker_current = breaker_current_raw * 0.1 if breaker_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('breaker_current', 'Breaker Current', "", 'A', breaker_current, breaker_current_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_65284(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65284."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # bank_instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'bank_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Bank Instance'")
    data_raw |= (field_value & 0xFF) << 16
    # indicator_number | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'indicator_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator Number'")
    data_raw |= (field_value & 0xFF) << 24
    # breaker_current | Offset: 32, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'breaker_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Breaker Current'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 32
    
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65285() -> bool:
    """Return True if PGN 65285 is a fast PGN."""
    return False
# Complex PGN. number of matches: 2
def decode_pgn_65285(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_65285_airmarBootStateAcknowledgment(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 140) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_65285_lowranceTemperature(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_65285_airmarBootStateAcknowledgment(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65285."""
    nmea2000Message = NMEA2000Message(65285, 'airmarBootStateAcknowledgment', 'Airmar: Boot State Acknowledgment')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # boot_state | Offset: 16, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    boot_state_raw = (data_raw >> 16) & 0x7
    boot_state = lookup_BOOT_STATE(boot_state_raw)
    nmea2000Message.fields.append(NMEA2000Field('boot_state', 'Boot State', "", '', boot_state, boot_state_raw))

    # reserved_19 | Offset: 19, Length: 45, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_19_raw = (data_raw >> 19) & 0x1FFFFFFFFFFF
    reserved_19 = reserved_19_raw * 1 if reserved_19_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_19', 'Reserved', "", '', reserved_19, reserved_19_raw))

    return nmea2000Message

def encode_pgn_65285_airmarBootStateAcknowledgment(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65285."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # boot_state | Offset: 16, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_BOOT_STATE(f.value) for f in nmea2000Message.fields if f.id == 'boot_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Boot State'")
    data_raw |= (field_value & 0x7) << 16
    # reserved_19 | Offset: 19, Length: 45, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_19'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1FFFFFFFFFFF) << 19
    return data_raw

def decode_pgn_65285_lowranceTemperature(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65285."""
    nmea2000Message = NMEA2000Message(65285, 'lowranceTemperature', 'Lowrance: Temperature')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 140
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Lowrance", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # temperature_source | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    temperature_source_raw = (data_raw >> 16) & 0xFF
    temperature_source = lookup_TEMPERATURE_SOURCE(temperature_source_raw)
    nmea2000Message.fields.append(NMEA2000Field('temperature_source', 'Temperature Source', "", '', temperature_source, temperature_source_raw))

    # actual_temperature | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    actual_temperature_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    actual_temperature = actual_temperature_raw * 0.01 if actual_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('actual_temperature', 'Actual Temperature', "", 'K', actual_temperature, actual_temperature_raw))

    # reserved_40 | Offset: 40, Length: 24, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0xFFFFFF
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    return nmea2000Message

def encode_pgn_65285_lowranceTemperature(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65285."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # temperature_source | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TEMPERATURE_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'temperature_source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temperature Source'")
    data_raw |= (field_value & 0xFF) << 16
    # actual_temperature | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'actual_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Actual Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 24
    
    # reserved_40 | Offset: 40, Length: 24, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    return data_raw


def is_fast_pgn_65286() -> bool:
    """Return True if PGN 65286 is a fast PGN."""
    return False
# Complex PGN. number of matches: 2
def decode_pgn_65286(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 409) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_65286_chetcoDimmer(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_65286_airmarBootStateRequest(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_65286_chetcoDimmer(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65286."""
    nmea2000Message = NMEA2000Message(65286, 'chetcoDimmer', 'Chetco: Dimmer')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 409
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Chetco", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # dimmer1 | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    dimmer1_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    dimmer1 = dimmer1_raw * 1 if dimmer1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dimmer1', 'Dimmer1', "", '', dimmer1, dimmer1_raw))

    # dimmer2 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    dimmer2_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    dimmer2 = dimmer2_raw * 1 if dimmer2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dimmer2', 'Dimmer2', "", '', dimmer2, dimmer2_raw))

    # dimmer3 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    dimmer3_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    dimmer3 = dimmer3_raw * 1 if dimmer3_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dimmer3', 'Dimmer3', "", '', dimmer3, dimmer3_raw))

    # dimmer4 | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    dimmer4_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    dimmer4 = dimmer4_raw * 1 if dimmer4_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dimmer4', 'Dimmer4', "", '', dimmer4, dimmer4_raw))

    # control | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    control_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    control = control_raw * 1 if control_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    return nmea2000Message

def encode_pgn_65286_chetcoDimmer(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65286."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 16
    # dimmer1 | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dimmer1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Dimmer1'")
    data_raw |= (field_value & 0xFF) << 24
    # dimmer2 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dimmer2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Dimmer2'")
    data_raw |= (field_value & 0xFF) << 32
    # dimmer3 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dimmer3'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Dimmer3'")
    data_raw |= (field_value & 0xFF) << 40
    # dimmer4 | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dimmer4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Dimmer4'")
    data_raw |= (field_value & 0xFF) << 48
    # control | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw

def decode_pgn_65286_airmarBootStateRequest(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65286."""
    nmea2000Message = NMEA2000Message(65286, 'airmarBootStateRequest', 'Airmar: Boot State Request')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFFFFFFFFFFFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    return nmea2000Message

def encode_pgn_65286_airmarBootStateRequest(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65286."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 16
    return data_raw


def is_fast_pgn_65287() -> bool:
    """Return True if PGN 65287 is a fast PGN."""
    return False
# Complex PGN. number of matches: 2
def decode_pgn_65287(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_65287_airmarAccessLevel(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_65287_simnetConfigureTemperatureSensor(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_65287_airmarAccessLevel(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65287."""
    nmea2000Message = NMEA2000Message(65287, 'airmarAccessLevel', 'Airmar: Access Level')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # format_code | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    format_code_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    format_code = format_code_raw * 1 if format_code_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('format_code', 'Format Code', "", '', format_code, format_code_raw))

    # access_level | Offset: 24, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    access_level_raw = (data_raw >> 24) & 0x7
    access_level = lookup_ACCESS_LEVEL(access_level_raw)
    nmea2000Message.fields.append(NMEA2000Field('access_level', 'Access Level', "", '', access_level, access_level_raw))

    # reserved_27 | Offset: 27, Length: 5, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_27_raw = (data_raw >> 27) & 0x1F
    reserved_27 = reserved_27_raw * 1 if reserved_27_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_27', 'Reserved', "", '', reserved_27, reserved_27_raw))

    # access_seed_key | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    access_seed_key_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    access_seed_key = access_seed_key_raw * 1 if access_seed_key_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('access_seed_key', 'Access Seed/Key', "When transmitted, it provides a seed for an unlock operation. It is used to provide the key during PGN 126208.", '', access_seed_key, access_seed_key_raw))

    return nmea2000Message

def encode_pgn_65287_airmarAccessLevel(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65287."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # format_code | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'format_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Format Code'")
    data_raw |= (field_value & 0xFF) << 16
    # access_level | Offset: 24, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ACCESS_LEVEL(f.value) for f in nmea2000Message.fields if f.id == 'access_level'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Access Level'")
    data_raw |= (field_value & 0x7) << 24
    # reserved_27 | Offset: 27, Length: 5, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_27'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1F) << 27
    # access_seed_key | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'access_seed_key'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Access Seed/Key'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw

def decode_pgn_65287_simnetConfigureTemperatureSensor(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65287."""
    nmea2000Message = NMEA2000Message(65287, 'simnetConfigureTemperatureSensor', 'Simnet: Configure Temperature Sensor')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFFFFFFFFFFFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    return nmea2000Message

def encode_pgn_65287_simnetConfigureTemperatureSensor(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65287."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 16
    return data_raw


def is_fast_pgn_65288() -> bool:
    """Return True if PGN 65288 is a fast PGN."""
    return False
def decode_pgn_65288(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65288."""
    nmea2000Message = NMEA2000Message(65288, 'seatalkAlarm', 'Seatalk: Alarm')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    sid_raw = (data_raw >> 16) & 0xFF
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # alarm_status | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    alarm_status_raw = (data_raw >> 24) & 0xFF
    alarm_status = lookup_SEATALK_ALARM_STATUS(alarm_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('alarm_status', 'Alarm Status', "", '', alarm_status, alarm_status_raw))

    # alarm_id | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    alarm_id_raw = (data_raw >> 32) & 0xFF
    alarm_id = lookup_SEATALK_ALARM_ID(alarm_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('alarm_id', 'Alarm ID', "", '', alarm_id, alarm_id_raw))

    # alarm_group | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    alarm_group_raw = (data_raw >> 40) & 0xFF
    alarm_group = lookup_SEATALK_ALARM_GROUP(alarm_group_raw)
    nmea2000Message.fields.append(NMEA2000Field('alarm_group', 'Alarm Group', "", '', alarm_group, alarm_group_raw))

    # alarm_priority | Offset: 48, Length: 16, Resolution: 1, Field Type: BINARY, Match: 
    alarm_priority_raw = (data_raw >> 48) & 0xFFFF
    alarm_priority = alarm_priority_raw * 1 if alarm_priority_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alarm_priority', 'Alarm Priority', "", '', alarm_priority, alarm_priority_raw))

    return nmea2000Message

def encode_pgn_65288(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65288."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 16
    # alarm_status | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SEATALK_ALARM_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'alarm_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alarm Status'")
    data_raw |= (field_value & 0xFF) << 24
    # alarm_id | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SEATALK_ALARM_ID(f.value) for f in nmea2000Message.fields if f.id == 'alarm_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alarm ID'")
    data_raw |= (field_value & 0xFF) << 32
    # alarm_group | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SEATALK_ALARM_GROUP(f.value) for f in nmea2000Message.fields if f.id == 'alarm_group'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alarm Group'")
    data_raw |= (field_value & 0xFF) << 40
    # alarm_priority | Offset: 48, Length: 16, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alarm_priority'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alarm Priority'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65289() -> bool:
    """Return True if PGN 65289 is a fast PGN."""
    return False
def decode_pgn_65289(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65289."""
    nmea2000Message = NMEA2000Message(65289, 'simnetTrimTabSensorCalibration', 'Simnet: Trim Tab Sensor Calibration')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFFFFFFFFFFFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    return nmea2000Message

def encode_pgn_65289(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65289."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 16
    return data_raw


def is_fast_pgn_65290() -> bool:
    """Return True if PGN 65290 is a fast PGN."""
    return False
def decode_pgn_65290(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65290."""
    nmea2000Message = NMEA2000Message(65290, 'simnetPaddleWheelSpeedConfiguration', 'Simnet: Paddle Wheel Speed Configuration')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFFFFFFFFFFFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    return nmea2000Message

def encode_pgn_65290(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65290."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 16
    return data_raw


def is_fast_pgn_65292() -> bool:
    """Return True if PGN 65292 is a fast PGN."""
    return False
def decode_pgn_65292(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65292."""
    nmea2000Message = NMEA2000Message(65292, 'simnetClearFluidLevelWarnings', 'Simnet: Clear Fluid Level Warnings')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFFFFFFFFFFFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    return nmea2000Message

def encode_pgn_65292(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65292."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 16
    return data_raw


def is_fast_pgn_65293() -> bool:
    """Return True if PGN 65293 is a fast PGN."""
    return False
# Complex PGN. number of matches: 2
def decode_pgn_65293(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_65293_simnetLgc2000Configuration(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 641) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_65293_diverseYachtServicesLoadCell(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_65293_simnetLgc2000Configuration(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65293."""
    nmea2000Message = NMEA2000Message(65293, 'simnetLgc2000Configuration', 'Simnet: LGC-2000 Configuration')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFFFFFFFFFFFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    return nmea2000Message

def encode_pgn_65293_simnetLgc2000Configuration(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65293."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 16
    return data_raw

def decode_pgn_65293_diverseYachtServicesLoadCell(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65293."""
    nmea2000Message = NMEA2000Message(65293, 'diverseYachtServicesLoadCell', 'Diverse Yacht Services: Load Cell')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 641
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Diverse Yacht Services", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # reserved_24 | Offset: 24, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_24_raw = (data_raw >> 24) & 0xFF
    reserved_24 = reserved_24_raw * 1 if reserved_24_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_24', 'Reserved', "", '', reserved_24, reserved_24_raw))

    # load_cell | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    load_cell_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    load_cell = load_cell_raw * 1 if load_cell_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('load_cell', 'Load Cell', "", '', load_cell, load_cell_raw))

    return nmea2000Message

def encode_pgn_65293_diverseYachtServicesLoadCell(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65293."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 16
    # reserved_24 | Offset: 24, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_24'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 24
    # load_cell | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'load_cell'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Load Cell'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65302() -> bool:
    """Return True if PGN 65302 is a fast PGN."""
    return False
def decode_pgn_65302(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65302."""
    nmea2000Message = NMEA2000Message(65302, 'simnetApUnknown1', 'Simnet: AP Unknown 1')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # c | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # d | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_65302(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65302."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 16
    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 24
    # c | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFFFF) << 32
    # d | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFF) << 48
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_65305() -> bool:
    """Return True if PGN 65305 is a fast PGN."""
    return False
# Complex PGN. number of matches: 5
def decode_pgn_65305(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 2)
        ):
        return decode_pgn_65305_simnetDeviceStatus(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 3)
        ):
        return decode_pgn_65305_simnetDeviceStatusRequest(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 10)
        ):
        return decode_pgn_65305_simnetPilotMode(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 11)
        ):
        return decode_pgn_65305_simnetDeviceModeRequest(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 23)
        ):
        return decode_pgn_65305_simnetSailingProcessorStatus(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_65305_simnetDeviceStatus(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65305."""
    nmea2000Message = NMEA2000Message(65305, 'simnetDeviceStatus', 'Simnet: Device Status')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # model | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    model_raw = (data_raw >> 16) & 0xFF
    model = lookup_SIMNET_DEVICE_MODEL(model_raw)
    nmea2000Message.fields.append(NMEA2000Field('model', 'Model', "", '', model, model_raw))

    # report | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 2
    report_raw = (data_raw >> 24) & 0xFF
    report = lookup_SIMNET_DEVICE_REPORT(report_raw)
    nmea2000Message.fields.append(NMEA2000Field('report', 'Report', "Status", '', report, report_raw))

    # status | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    status_raw = (data_raw >> 32) & 0xFF
    status = lookup_SIMNET_AP_STATUS(status_raw)
    nmea2000Message.fields.append(NMEA2000Field('status', 'Status', "", '', status, status_raw))

    # spare | Offset: 40, Length: 24, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 40) & 0xFFFFFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    return nmea2000Message

def encode_pgn_65305_simnetDeviceStatus(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65305."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # model | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DEVICE_MODEL(f.value) for f in nmea2000Message.fields if f.id == 'model'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Model'")
    data_raw |= (field_value & 0xFF) << 16
    # report | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DEVICE_REPORT(f.value) for f in nmea2000Message.fields if f.id == 'report'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Report'")
    data_raw |= (field_value & 0xFF) << 24
    # status | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_AP_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Status'")
    data_raw |= (field_value & 0xFF) << 32
    # spare | Offset: 40, Length: 24, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    return data_raw

def decode_pgn_65305_simnetDeviceStatusRequest(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65305."""
    nmea2000Message = NMEA2000Message(65305, 'simnetDeviceStatusRequest', 'Simnet: Device Status Request')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # model | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    model_raw = (data_raw >> 16) & 0xFF
    model = lookup_SIMNET_DEVICE_MODEL(model_raw)
    nmea2000Message.fields.append(NMEA2000Field('model', 'Model', "", '', model, model_raw))

    # report | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 3
    report_raw = (data_raw >> 24) & 0xFF
    report = lookup_SIMNET_DEVICE_REPORT(report_raw)
    nmea2000Message.fields.append(NMEA2000Field('report', 'Report', "Send Status", '', report, report_raw))

    # spare | Offset: 32, Length: 32, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 32) & 0xFFFFFFFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    return nmea2000Message

def encode_pgn_65305_simnetDeviceStatusRequest(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65305."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # model | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DEVICE_MODEL(f.value) for f in nmea2000Message.fields if f.id == 'model'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Model'")
    data_raw |= (field_value & 0xFF) << 16
    # report | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DEVICE_REPORT(f.value) for f in nmea2000Message.fields if f.id == 'report'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Report'")
    data_raw |= (field_value & 0xFF) << 24
    # spare | Offset: 32, Length: 32, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw

def decode_pgn_65305_simnetPilotMode(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65305."""
    nmea2000Message = NMEA2000Message(65305, 'simnetPilotMode', 'Simnet: Pilot Mode')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # model | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    model_raw = (data_raw >> 16) & 0xFF
    model = lookup_SIMNET_DEVICE_MODEL(model_raw)
    nmea2000Message.fields.append(NMEA2000Field('model', 'Model', "", '', model, model_raw))

    # report | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 10
    report_raw = (data_raw >> 24) & 0xFF
    report = lookup_SIMNET_DEVICE_REPORT(report_raw)
    nmea2000Message.fields.append(NMEA2000Field('report', 'Report', "Mode", '', report, report_raw))

    # mode | Offset: 32, Length: 16, Resolution: 1, Field Type: BITLOOKUP, Match: 
    mode_raw = (data_raw >> 32) & 0xFFFF
    mode = mode_raw * 1 if mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "", '', mode, mode_raw))

    # spare | Offset: 48, Length: 16, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 48) & 0xFFFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    return nmea2000Message

def encode_pgn_65305_simnetPilotMode(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65305."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # model | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DEVICE_MODEL(f.value) for f in nmea2000Message.fields if f.id == 'model'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Model'")
    data_raw |= (field_value & 0xFF) << 16
    # report | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DEVICE_REPORT(f.value) for f in nmea2000Message.fields if f.id == 'report'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Report'")
    data_raw |= (field_value & 0xFF) << 24
    # mode | Offset: 32, Length: 16, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xFFFF) << 32
    # spare | Offset: 48, Length: 16, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw

def decode_pgn_65305_simnetDeviceModeRequest(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65305."""
    nmea2000Message = NMEA2000Message(65305, 'simnetDeviceModeRequest', 'Simnet: Device Mode Request')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # model | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    model_raw = (data_raw >> 16) & 0xFF
    model = lookup_SIMNET_DEVICE_MODEL(model_raw)
    nmea2000Message.fields.append(NMEA2000Field('model', 'Model', "", '', model, model_raw))

    # report | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 11
    report_raw = (data_raw >> 24) & 0xFF
    report = lookup_SIMNET_DEVICE_REPORT(report_raw)
    nmea2000Message.fields.append(NMEA2000Field('report', 'Report', "Send Mode", '', report, report_raw))

    # spare | Offset: 32, Length: 32, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 32) & 0xFFFFFFFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    return nmea2000Message

def encode_pgn_65305_simnetDeviceModeRequest(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65305."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # model | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DEVICE_MODEL(f.value) for f in nmea2000Message.fields if f.id == 'model'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Model'")
    data_raw |= (field_value & 0xFF) << 16
    # report | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DEVICE_REPORT(f.value) for f in nmea2000Message.fields if f.id == 'report'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Report'")
    data_raw |= (field_value & 0xFF) << 24
    # spare | Offset: 32, Length: 32, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw

def decode_pgn_65305_simnetSailingProcessorStatus(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65305."""
    nmea2000Message = NMEA2000Message(65305, 'simnetSailingProcessorStatus', 'Simnet: Sailing Processor Status')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # model | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    model_raw = (data_raw >> 16) & 0xFF
    model = lookup_SIMNET_DEVICE_MODEL(model_raw)
    nmea2000Message.fields.append(NMEA2000Field('model', 'Model', "", '', model, model_raw))

    # report | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 23
    report_raw = (data_raw >> 24) & 0xFF
    report = lookup_SIMNET_DEVICE_REPORT(report_raw)
    nmea2000Message.fields.append(NMEA2000Field('report', 'Report', "Sailing Processor Status", '', report, report_raw))

    # data | Offset: 32, Length: 32, Resolution: 1, Field Type: BINARY, Match: 
    data_raw = (data_raw >> 32) & 0xFFFFFFFF
    data = data_raw * 1 if data_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data', 'Data', "", '', data, data_raw))

    return nmea2000Message

def encode_pgn_65305_simnetSailingProcessorStatus(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65305."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # model | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DEVICE_MODEL(f.value) for f in nmea2000Message.fields if f.id == 'model'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Model'")
    data_raw |= (field_value & 0xFF) << 16
    # report | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DEVICE_REPORT(f.value) for f in nmea2000Message.fields if f.id == 'report'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Report'")
    data_raw |= (field_value & 0xFF) << 24
    # data | Offset: 32, Length: 32, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65309() -> bool:
    """Return True if PGN 65309 is a fast PGN."""
    return False
def decode_pgn_65309(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65309."""
    nmea2000Message = NMEA2000Message(65309, 'navicoWirelessBatteryStatus', 'Navico: Wireless Battery Status')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # status | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    status_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    status = status_raw * 1 if status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('status', 'Status', "", '', status, status_raw))

    # battery_status | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    battery_status_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    battery_status = battery_status_raw * 1 if battery_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('battery_status', 'Battery Status', "", '%', battery_status, battery_status_raw))

    # battery_charge_status | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    battery_charge_status_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    battery_charge_status = battery_charge_status_raw * 1 if battery_charge_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('battery_charge_status', 'Battery Charge Status', "", '%', battery_charge_status, battery_charge_status_raw))

    # reserved_40 | Offset: 40, Length: 24, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0xFFFFFF
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    return nmea2000Message

def encode_pgn_65309(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65309."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # status | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Status'")
    data_raw |= (field_value & 0xFF) << 16
    # battery_status | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'battery_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Battery Status'")
    data_raw |= (field_value & 0xFF) << 24
    # battery_charge_status | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'battery_charge_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Battery Charge Status'")
    data_raw |= (field_value & 0xFF) << 32
    # reserved_40 | Offset: 40, Length: 24, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    return data_raw


def is_fast_pgn_65312() -> bool:
    """Return True if PGN 65312 is a fast PGN."""
    return False
def decode_pgn_65312(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65312."""
    nmea2000Message = NMEA2000Message(65312, 'navicoWirelessSignalStatus', 'Navico: Wireless Signal Status')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # unknown | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    unknown_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    unknown = unknown_raw * 1 if unknown_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown', 'Unknown', "", '', unknown, unknown_raw))

    # signal_strength | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    signal_strength_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    signal_strength = signal_strength_raw * 1 if signal_strength_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('signal_strength', 'Signal Strength', "", '%', signal_strength, signal_strength_raw))

    # reserved_32 | Offset: 32, Length: 32, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_32_raw = (data_raw >> 32) & 0xFFFFFFFF
    reserved_32 = reserved_32_raw * 1 if reserved_32_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_32', 'Reserved', "", '', reserved_32, reserved_32_raw))

    return nmea2000Message

def encode_pgn_65312(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65312."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # unknown | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown'")
    data_raw |= (field_value & 0xFF) << 16
    # signal_strength | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'signal_strength'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Signal Strength'")
    data_raw |= (field_value & 0xFF) << 24
    # reserved_32 | Offset: 32, Length: 32, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_32'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65340() -> bool:
    """Return True if PGN 65340 is a fast PGN."""
    return False
def decode_pgn_65340(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65340."""
    nmea2000Message = NMEA2000Message(65340, 'simnetApUnknown2', 'Simnet: AP Unknown 2')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # c | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # d | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    # e | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_65340(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65340."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 16
    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 24
    # c | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 32
    # d | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFF) << 40
    # e | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFF) << 48
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_65341() -> bool:
    """Return True if PGN 65341 is a fast PGN."""
    return False
def decode_pgn_65341(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65341."""
    nmea2000Message = NMEA2000Message(65341, 'simnetAutopilotAngle', 'Simnet: Autopilot Angle')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFFFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # mode | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    mode_raw = (data_raw >> 32) & 0xFF
    mode = lookup_SIMNET_AP_MODE(mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "", '', mode, mode_raw))

    # reserved_40 | Offset: 40, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0xFF
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    # angle | Offset: 48, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    angle_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    angle = angle_raw * 0.0001 if angle_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('angle', 'Angle', "", 'rad', angle, angle_raw))

    return nmea2000Message

def encode_pgn_65341(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65341."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 16
    # mode | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_AP_MODE(f.value) for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xFF) << 32
    # reserved_40 | Offset: 40, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 40
    # angle | Offset: 48, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'angle'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Angle'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 48
    
    return data_raw


def is_fast_pgn_65345() -> bool:
    """Return True if PGN 65345 is a fast PGN."""
    return False
def decode_pgn_65345(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65345."""
    nmea2000Message = NMEA2000Message(65345, 'seatalkPilotWindDatum', 'Seatalk: Pilot Wind Datum')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # wind_datum | Offset: 16, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    wind_datum_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    wind_datum = wind_datum_raw * 0.0001 if wind_datum_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wind_datum', 'Wind Datum', "", 'rad', wind_datum, wind_datum_raw))

    # rolling_average_wind_angle | Offset: 32, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    rolling_average_wind_angle_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    rolling_average_wind_angle = rolling_average_wind_angle_raw * 0.0001 if rolling_average_wind_angle_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rolling_average_wind_angle', 'Rolling Average Wind Angle', "", 'rad', rolling_average_wind_angle, rolling_average_wind_angle_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_65345(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65345."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # wind_datum | Offset: 16, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wind_datum'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wind Datum'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 16
    
    # rolling_average_wind_angle | Offset: 32, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rolling_average_wind_angle'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rolling Average Wind Angle'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 32
    
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_65350() -> bool:
    """Return True if PGN 65350 is a fast PGN."""
    return False
def decode_pgn_65350(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65350."""
    nmea2000Message = NMEA2000Message(65350, 'simnetMagneticField', 'Simnet: Magnetic Field')
    # a | Offset: 0, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    if a_raw is not None and a_raw & (1 << (16 - 1)):
        a_raw -= (1 << 16)
    a = a_raw * 0.0001 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", 'rad', a, a_raw))

    # b | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '%', b, b_raw))

    # c | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    if c_raw is not None and c_raw & (1 << (16 - 1)):
        c_raw -= (1 << 16)
    c = c_raw * 0.0001 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", 'rad', c, c_raw))

    # d | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    if d_raw is not None and d_raw & (1 << (16 - 1)):
        d_raw -= (1 << 16)
    d = d_raw * 0.0001 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", 'rad', d, d_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_65350(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65350."""
    data_raw = 0
    # a | Offset: 0, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 0
    
    # b | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 16
    # c | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 24
    
    # d | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 40
    
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_65359() -> bool:
    """Return True if PGN 65359 is a fast PGN."""
    return False
def decode_pgn_65359(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65359."""
    nmea2000Message = NMEA2000Message(65359, 'seatalkPilotHeading', 'Seatalk: Pilot Heading')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    sid_raw = (data_raw >> 16) & 0xFF
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # heading_true | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    heading_true_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    heading_true = heading_true_raw * 0.0001 if heading_true_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('heading_true', 'Heading True', "", 'rad', heading_true, heading_true_raw))

    # heading_magnetic | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    heading_magnetic_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    heading_magnetic = heading_magnetic_raw * 0.0001 if heading_magnetic_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('heading_magnetic', 'Heading Magnetic', "", 'rad', heading_magnetic, heading_magnetic_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_65359(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65359."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 16
    # heading_true | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'heading_true'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Heading True'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 24
    
    # heading_magnetic | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'heading_magnetic'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Heading Magnetic'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 40
    
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_65360() -> bool:
    """Return True if PGN 65360 is a fast PGN."""
    return False
def decode_pgn_65360(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65360."""
    nmea2000Message = NMEA2000Message(65360, 'seatalkPilotLockedHeading', 'Seatalk: Pilot Locked Heading')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    sid_raw = (data_raw >> 16) & 0xFF
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # target_heading_true | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    target_heading_true_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    target_heading_true = target_heading_true_raw * 0.0001 if target_heading_true_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('target_heading_true', 'Target Heading True', "", 'rad', target_heading_true, target_heading_true_raw))

    # target_heading_magnetic | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    target_heading_magnetic_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    target_heading_magnetic = target_heading_magnetic_raw * 0.0001 if target_heading_magnetic_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('target_heading_magnetic', 'Target Heading Magnetic', "", 'rad', target_heading_magnetic, target_heading_magnetic_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_65360(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65360."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 16
    # target_heading_true | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'target_heading_true'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Target Heading True'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 24
    
    # target_heading_magnetic | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'target_heading_magnetic'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Target Heading Magnetic'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 40
    
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_65361() -> bool:
    """Return True if PGN 65361 is a fast PGN."""
    return False
def decode_pgn_65361(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65361."""
    nmea2000Message = NMEA2000Message(65361, 'seatalkSilenceAlarm', 'Seatalk: Silence Alarm')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # alarm_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    alarm_id_raw = (data_raw >> 16) & 0xFF
    alarm_id = lookup_SEATALK_ALARM_ID(alarm_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('alarm_id', 'Alarm ID', "", '', alarm_id, alarm_id_raw))

    # alarm_group | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    alarm_group_raw = (data_raw >> 24) & 0xFF
    alarm_group = lookup_SEATALK_ALARM_GROUP(alarm_group_raw)
    nmea2000Message.fields.append(NMEA2000Field('alarm_group', 'Alarm Group', "", '', alarm_group, alarm_group_raw))

    # reserved_32 | Offset: 32, Length: 32, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_32_raw = (data_raw >> 32) & 0xFFFFFFFF
    reserved_32 = reserved_32_raw * 1 if reserved_32_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_32', 'Reserved', "", '', reserved_32, reserved_32_raw))

    return nmea2000Message

def encode_pgn_65361(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65361."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # alarm_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SEATALK_ALARM_ID(f.value) for f in nmea2000Message.fields if f.id == 'alarm_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alarm ID'")
    data_raw |= (field_value & 0xFF) << 16
    # alarm_group | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SEATALK_ALARM_GROUP(f.value) for f in nmea2000Message.fields if f.id == 'alarm_group'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alarm Group'")
    data_raw |= (field_value & 0xFF) << 24
    # reserved_32 | Offset: 32, Length: 32, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_32'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_65371() -> bool:
    """Return True if PGN 65371 is a fast PGN."""
    return False
def decode_pgn_65371(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65371."""
    nmea2000Message = NMEA2000Message(65371, 'seatalkKeypadMessage', 'Seatalk: Keypad Message')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    proprietary_id_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    proprietary_id = proprietary_id_raw * 1 if proprietary_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "", '', proprietary_id, proprietary_id_raw))

    # first_key | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    first_key_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    first_key = first_key_raw * 1 if first_key_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('first_key', 'First key', "", '', first_key, first_key_raw))

    # second_key | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    second_key_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    second_key = second_key_raw * 1 if second_key_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('second_key', 'Second key', "", '', second_key, second_key_raw))

    # first_key_state | Offset: 40, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    first_key_state_raw = decode_number((data_raw >> 40) & 0x3, 2)
    first_key_state = first_key_state_raw * 1 if first_key_state_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('first_key_state', 'First key state', "", '', first_key_state, first_key_state_raw))

    # second_key_state | Offset: 42, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    second_key_state_raw = decode_number((data_raw >> 42) & 0x3, 2)
    second_key_state = second_key_state_raw * 1 if second_key_state_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('second_key_state', 'Second key state', "", '', second_key_state, second_key_state_raw))

    # reserved_44 | Offset: 44, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_44_raw = (data_raw >> 44) & 0xF
    reserved_44 = reserved_44_raw * 1 if reserved_44_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_44', 'Reserved', "", '', reserved_44, reserved_44_raw))

    # encoder_position | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    encoder_position_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    encoder_position = encoder_position_raw * 1 if encoder_position_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('encoder_position', 'Encoder Position', "", '', encoder_position, encoder_position_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_65371(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65371."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # first_key | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'first_key'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'First key'")
    data_raw |= (field_value & 0xFF) << 24
    # second_key | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'second_key'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Second key'")
    data_raw |= (field_value & 0xFF) << 32
    # first_key_state | Offset: 40, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'first_key_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'First key state'")
    data_raw |= (field_value & 0x3) << 40
    # second_key_state | Offset: 42, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'second_key_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Second key state'")
    data_raw |= (field_value & 0x3) << 42
    # reserved_44 | Offset: 44, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_44'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 44
    # encoder_position | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'encoder_position'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Encoder Position'")
    data_raw |= (field_value & 0xFF) << 48
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_65374() -> bool:
    """Return True if PGN 65374 is a fast PGN."""
    return False
def decode_pgn_65374(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65374."""
    nmea2000Message = NMEA2000Message(65374, 'seatalkKeypadHeartbeat', 'SeaTalk: Keypad Heartbeat')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    proprietary_id_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    proprietary_id = proprietary_id_raw * 1 if proprietary_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "", '', proprietary_id, proprietary_id_raw))

    # variant | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    variant_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    variant = variant_raw * 1 if variant_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('variant', 'Variant', "", '', variant, variant_raw))

    # status | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    status_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    status = status_raw * 1 if status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('status', 'Status', "", '', status, status_raw))

    # reserved_40 | Offset: 40, Length: 24, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0xFFFFFF
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    return nmea2000Message

def encode_pgn_65374(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65374."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # variant | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'variant'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Variant'")
    data_raw |= (field_value & 0xFF) << 24
    # status | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Status'")
    data_raw |= (field_value & 0xFF) << 32
    # reserved_40 | Offset: 40, Length: 24, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    return data_raw


def is_fast_pgn_65379() -> bool:
    """Return True if PGN 65379 is a fast PGN."""
    return False
def decode_pgn_65379(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65379."""
    nmea2000Message = NMEA2000Message(65379, 'seatalkPilotMode', 'Seatalk: Pilot Mode')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # pilot_mode | Offset: 16, Length: 16, Resolution: 1, Field Type: LOOKUP, Match: 
    pilot_mode_raw = (data_raw >> 16) & 0xFFFF
    pilot_mode = lookup_SEATALK_PILOT_MODE_16(pilot_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('pilot_mode', 'Pilot Mode', "", '', pilot_mode, pilot_mode_raw))

    # sub_mode | Offset: 32, Length: 16, Resolution: 1, Field Type: BINARY, Match: 
    sub_mode_raw = (data_raw >> 32) & 0xFFFF
    sub_mode = sub_mode_raw * 1 if sub_mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sub_mode', 'Sub Mode', "", '', sub_mode, sub_mode_raw))

    # pilot_mode_data | Offset: 48, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    pilot_mode_data_raw = (data_raw >> 48) & 0xFF
    pilot_mode_data = pilot_mode_data_raw * 1 if pilot_mode_data_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pilot_mode_data', 'Pilot Mode Data', "", '', pilot_mode_data, pilot_mode_data_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_65379(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65379."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # pilot_mode | Offset: 16, Length: 16, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SEATALK_PILOT_MODE_16(f.value) for f in nmea2000Message.fields if f.id == 'pilot_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Pilot Mode'")
    data_raw |= (field_value & 0xFFFF) << 16
    # sub_mode | Offset: 32, Length: 16, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sub_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sub Mode'")
    data_raw |= (field_value & 0xFFFF) << 32
    # pilot_mode_data | Offset: 48, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pilot_mode_data'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Pilot Mode Data'")
    data_raw |= (field_value & 0xFF) << 48
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_65408() -> bool:
    """Return True if PGN 65408 is a fast PGN."""
    return False
def decode_pgn_65408(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65408."""
    nmea2000Message = NMEA2000Message(65408, 'airmarDepthQualityFactor', 'Airmar: Depth Quality Factor')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # depth_quality_factor | Offset: 24, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    depth_quality_factor_raw = (data_raw >> 24) & 0xF
    depth_quality_factor = lookup_AIRMAR_DEPTH_QUALITY_FACTOR(depth_quality_factor_raw)
    nmea2000Message.fields.append(NMEA2000Field('depth_quality_factor', 'Depth Quality Factor', "", '', depth_quality_factor, depth_quality_factor_raw))

    # reserved_28 | Offset: 28, Length: 36, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_28_raw = (data_raw >> 28) & 0xFFFFFFFFF
    reserved_28 = reserved_28_raw * 1 if reserved_28_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_28', 'Reserved', "", '', reserved_28, reserved_28_raw))

    return nmea2000Message

def encode_pgn_65408(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65408."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 16
    # depth_quality_factor | Offset: 24, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_DEPTH_QUALITY_FACTOR(f.value) for f in nmea2000Message.fields if f.id == 'depth_quality_factor'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Depth Quality Factor'")
    data_raw |= (field_value & 0xF) << 24
    # reserved_28 | Offset: 28, Length: 36, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_28'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFFF) << 28
    return data_raw


def is_fast_pgn_65409() -> bool:
    """Return True if PGN 65409 is a fast PGN."""
    return False
def decode_pgn_65409(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65409."""
    nmea2000Message = NMEA2000Message(65409, 'airmarSpeedPulseCount', 'Airmar: Speed Pulse Count')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # duration_of_interval | Offset: 24, Length: 16, Resolution: 0.001, Field Type: TIME, Match: 
    duration_of_interval_raw = (data_raw >> 24) & 0xFFFF
    duration_of_interval = decode_time(duration_of_interval_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('duration_of_interval', 'Duration of interval', "", 's', duration_of_interval, duration_of_interval_raw))

    # number_of_pulses_received | Offset: 40, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_pulses_received_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    number_of_pulses_received = number_of_pulses_received_raw * 1 if number_of_pulses_received_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_pulses_received', 'Number of pulses received', "", '', number_of_pulses_received, number_of_pulses_received_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_65409(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65409."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 16
    # duration_of_interval | Offset: 24, Length: 16, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'duration_of_interval'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Duration of interval'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 24
    
    # number_of_pulses_received | Offset: 40, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_pulses_received'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of pulses received'")
    data_raw |= (field_value & 0xFFFF) << 40
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_65410() -> bool:
    """Return True if PGN 65410 is a fast PGN."""
    return False
def decode_pgn_65410(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65410."""
    nmea2000Message = NMEA2000Message(65410, 'airmarDeviceInformation', 'Airmar: Device Information')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # internal_device_temperature | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    internal_device_temperature_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    internal_device_temperature = internal_device_temperature_raw * 0.01 if internal_device_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('internal_device_temperature', 'Internal Device Temperature', "", 'K', internal_device_temperature, internal_device_temperature_raw))

    # supply_voltage | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    supply_voltage_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    supply_voltage = supply_voltage_raw * 0.01 if supply_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('supply_voltage', 'Supply Voltage', "", 'V', supply_voltage, supply_voltage_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_65410(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65410."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 16
    # internal_device_temperature | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'internal_device_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Internal Device Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 24
    
    # supply_voltage | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'supply_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Supply Voltage'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 40
    
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_65420() -> bool:
    """Return True if PGN 65420 is a fast PGN."""
    return False
def decode_pgn_65420(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65420."""
    nmea2000Message = NMEA2000Message(65420, 'simnetApUnknown3', 'Simnet: AP Unknown 3')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # c | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # d | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    # e | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_65420(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65420."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 16
    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 24
    # c | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 32
    # d | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFF) << 40
    # e | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFF) << 48
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_65480() -> bool:
    """Return True if PGN 65480 is a fast PGN."""
    return False
def decode_pgn_65480(data_raw: int) -> NMEA2000Message:
    """Decode PGN 65480."""
    nmea2000Message = NMEA2000Message(65480, 'simnetAutopilotMode', 'Simnet: Autopilot Mode')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFFFFFFFFFFFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    return nmea2000Message

def encode_pgn_65480(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 65480."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 16
    return data_raw


def is_fast_pgn_126208() -> bool:
    """Return True if PGN 126208 is a fast PGN."""
    return True
# Complex PGN. number of matches: 7
def decode_pgn_126208(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0xFF) == 0)
        ):
        return decode_pgn_126208_nmeaRequestGroupFunction(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0xFF) == 1)
        ):
        return decode_pgn_126208_nmeaCommandGroupFunction(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0xFF) == 2)
        ):
        return decode_pgn_126208_nmeaAcknowledgeGroupFunction(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0xFF) == 3)
        ):
        return decode_pgn_126208_nmeaReadFieldsGroupFunction(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0xFF) == 4)
        ):
        return decode_pgn_126208_nmeaReadFieldsReplyGroupFunction(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0xFF) == 5)
        ):
        return decode_pgn_126208_nmeaWriteFieldsGroupFunction(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0xFF) == 6)
        ):
        return decode_pgn_126208_nmeaWriteFieldsReplyGroupFunction(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_126208_nmeaRequestGroupFunction(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126208."""
    nmea2000Message = NMEA2000Message(126208, 'nmeaRequestGroupFunction', 'NMEA - Request group function')
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 0
    function_code_raw = (data_raw >> 0) & 0xFF
    function_code = lookup_GROUP_FUNCTION(function_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('function_code', 'Function Code', "Request", '', function_code, function_code_raw))

    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 8) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "Requested PGN", '', pgn, pgn_raw))

    # transmission_interval | Offset: 32, Length: 32, Resolution: 0.001, Field Type: TIME, Match: 
    transmission_interval_raw = (data_raw >> 32) & 0xFFFFFFFF
    transmission_interval = decode_time(transmission_interval_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('transmission_interval', 'Transmission interval', "", 's', transmission_interval, transmission_interval_raw))

    # transmission_interval_offset | Offset: 64, Length: 16, Resolution: 0.01, Field Type: TIME, Match: 
    transmission_interval_offset_raw = (data_raw >> 64) & 0xFFFF
    transmission_interval_offset = decode_time(transmission_interval_offset_raw * 0.01)
    nmea2000Message.fields.append(NMEA2000Field('transmission_interval_offset', 'Transmission interval offset', "", 's', transmission_interval_offset, transmission_interval_offset_raw))

    # number_of_parameters | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_parameters_raw = decode_number((data_raw >> 80) & 0xFF, 8)
    number_of_parameters = number_of_parameters_raw * 1 if number_of_parameters_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_parameters', 'Number of Parameters', "How many parameter pairs will follow", '', number_of_parameters, number_of_parameters_raw))

    # parameter | Offset: 88, Length: 8, Resolution: 1, Field Type: FIELD_INDEX, Match: 
    parameter_raw = (data_raw >> 88) & 0xFF
    parameter = parameter_raw * 1 if parameter_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('parameter', 'Parameter', "Parameter index", '', parameter, parameter_raw))


    return nmea2000Message

def encode_pgn_126208_nmeaRequestGroupFunction(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126208."""
    data_raw = 0
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GROUP_FUNCTION(f.value) for f in nmea2000Message.fields if f.id == 'function_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Function Code'")
    data_raw |= (field_value & 0xFF) << 0
    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 8
    # transmission_interval | Offset: 32, Length: 32, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'transmission_interval'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Transmission interval'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFFFF) << 32
    
    # transmission_interval_offset | Offset: 64, Length: 16, Resolution: 0.01, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'transmission_interval_offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Transmission interval offset'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 64
    
    # number_of_parameters | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_parameters'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Parameters'")
    data_raw |= (field_value & 0xFF) << 80
    # parameter | Offset: 88, Length: 8, Resolution: 1, Field Type: FIELD_INDEX
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'parameter'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Parameter'")
    data_raw |= (field_value & 0xFF) << 88
    raise Exception ("PGN 126208 not supporting encoding for now as Value is missing BitLength or BitOffset")
    return data_raw

def decode_pgn_126208_nmeaCommandGroupFunction(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126208."""
    nmea2000Message = NMEA2000Message(126208, 'nmeaCommandGroupFunction', 'NMEA - Command group function')
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 1
    function_code_raw = (data_raw >> 0) & 0xFF
    function_code = lookup_GROUP_FUNCTION(function_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('function_code', 'Function Code', "Command", '', function_code, function_code_raw))

    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 8) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "Commanded PGN", '', pgn, pgn_raw))

    # priority | Offset: 32, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    priority_raw = (data_raw >> 32) & 0xF
    priority = lookup_PRIORITY(priority_raw)
    nmea2000Message.fields.append(NMEA2000Field('priority', 'Priority', "", '', priority, priority_raw))

    # reserved_36 | Offset: 36, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_36_raw = (data_raw >> 36) & 0xF
    reserved_36 = reserved_36_raw * 1 if reserved_36_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_36', 'Reserved', "", '', reserved_36, reserved_36_raw))

    # number_of_parameters | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_parameters_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    number_of_parameters = number_of_parameters_raw * 1 if number_of_parameters_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_parameters', 'Number of Parameters', "How many parameter pairs will follow", '', number_of_parameters, number_of_parameters_raw))

    # parameter | Offset: 48, Length: 8, Resolution: 1, Field Type: FIELD_INDEX, Match: 
    parameter_raw = (data_raw >> 48) & 0xFF
    parameter = parameter_raw * 1 if parameter_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('parameter', 'Parameter', "Parameter index", '', parameter, parameter_raw))


    return nmea2000Message

def encode_pgn_126208_nmeaCommandGroupFunction(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126208."""
    data_raw = 0
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GROUP_FUNCTION(f.value) for f in nmea2000Message.fields if f.id == 'function_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Function Code'")
    data_raw |= (field_value & 0xFF) << 0
    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 8
    # priority | Offset: 32, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_PRIORITY(f.value) for f in nmea2000Message.fields if f.id == 'priority'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Priority'")
    data_raw |= (field_value & 0xF) << 32
    # reserved_36 | Offset: 36, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_36'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 36
    # number_of_parameters | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_parameters'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Parameters'")
    data_raw |= (field_value & 0xFF) << 40
    # parameter | Offset: 48, Length: 8, Resolution: 1, Field Type: FIELD_INDEX
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'parameter'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Parameter'")
    data_raw |= (field_value & 0xFF) << 48
    raise Exception ("PGN 126208 not supporting encoding for now as Value is missing BitLength or BitOffset")
    return data_raw

def decode_pgn_126208_nmeaAcknowledgeGroupFunction(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126208."""
    nmea2000Message = NMEA2000Message(126208, 'nmeaAcknowledgeGroupFunction', 'NMEA - Acknowledge group function')
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 2
    function_code_raw = (data_raw >> 0) & 0xFF
    function_code = lookup_GROUP_FUNCTION(function_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('function_code', 'Function Code', "Acknowledge", '', function_code, function_code_raw))

    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 8) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "Commanded PGN", '', pgn, pgn_raw))

    # pgn_error_code | Offset: 32, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    pgn_error_code_raw = (data_raw >> 32) & 0xF
    pgn_error_code = lookup_PGN_ERROR_CODE(pgn_error_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('pgn_error_code', 'PGN error code', "", '', pgn_error_code, pgn_error_code_raw))

    # transmission_interval_priority_error_code | Offset: 36, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    transmission_interval_priority_error_code_raw = (data_raw >> 36) & 0xF
    transmission_interval_priority_error_code = lookup_TRANSMISSION_INTERVAL(transmission_interval_priority_error_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('transmission_interval_priority_error_code', 'Transmission interval/Priority error code', "", '', transmission_interval_priority_error_code, transmission_interval_priority_error_code_raw))

    # number_of_parameters | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_parameters_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    number_of_parameters = number_of_parameters_raw * 1 if number_of_parameters_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_parameters', 'Number of Parameters', "", '', number_of_parameters, number_of_parameters_raw))

    # parameter | Offset: 48, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    parameter_raw = (data_raw >> 48) & 0xF
    parameter = lookup_PARAMETER_FIELD(parameter_raw)
    nmea2000Message.fields.append(NMEA2000Field('parameter', 'Parameter', "", '', parameter, parameter_raw))

    return nmea2000Message

def encode_pgn_126208_nmeaAcknowledgeGroupFunction(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126208."""
    data_raw = 0
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GROUP_FUNCTION(f.value) for f in nmea2000Message.fields if f.id == 'function_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Function Code'")
    data_raw |= (field_value & 0xFF) << 0
    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 8
    # pgn_error_code | Offset: 32, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_PGN_ERROR_CODE(f.value) for f in nmea2000Message.fields if f.id == 'pgn_error_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN error code'")
    data_raw |= (field_value & 0xF) << 32
    # transmission_interval_priority_error_code | Offset: 36, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TRANSMISSION_INTERVAL(f.value) for f in nmea2000Message.fields if f.id == 'transmission_interval_priority_error_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Transmission interval/Priority error code'")
    data_raw |= (field_value & 0xF) << 36
    # number_of_parameters | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_parameters'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Parameters'")
    data_raw |= (field_value & 0xFF) << 40
    # parameter | Offset: 48, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_PARAMETER_FIELD(f.value) for f in nmea2000Message.fields if f.id == 'parameter'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Parameter'")
    data_raw |= (field_value & 0xF) << 48
    return data_raw

def decode_pgn_126208_nmeaReadFieldsGroupFunction(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126208."""
    nmea2000Message = NMEA2000Message(126208, 'nmeaReadFieldsGroupFunction', 'NMEA - Read Fields group function')
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 3
    function_code_raw = (data_raw >> 0) & 0xFF
    function_code = lookup_GROUP_FUNCTION(function_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('function_code', 'Function Code', "Read Fields", '', function_code, function_code_raw))

    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 8) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "Commanded PGN", '', pgn, pgn_raw))

    # manufacturer_code | Offset: 32, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 
    manufacturer_code_raw = (data_raw >> 32) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Only in PGN when Commanded PGN is proprietary", '', manufacturer_code, manufacturer_code_raw))









    return nmea2000Message

def encode_pgn_126208_nmeaReadFieldsGroupFunction(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126208."""
    data_raw = 0
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GROUP_FUNCTION(f.value) for f in nmea2000Message.fields if f.id == 'function_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Function Code'")
    data_raw |= (field_value & 0xFF) << 0
    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 8
    # manufacturer_code | Offset: 32, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 32
    raise Exception ("PGN 126208 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Industry Code is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Unique ID is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Number of Selection Pairs is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Number of Parameters is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Selection Parameter is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Selection Value is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Parameter is missing BitLength or BitOffset")
    return data_raw

def decode_pgn_126208_nmeaReadFieldsReplyGroupFunction(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126208."""
    nmea2000Message = NMEA2000Message(126208, 'nmeaReadFieldsReplyGroupFunction', 'NMEA - Read Fields reply group function')
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 4
    function_code_raw = (data_raw >> 0) & 0xFF
    function_code = lookup_GROUP_FUNCTION(function_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('function_code', 'Function Code', "Read Fields Reply", '', function_code, function_code_raw))

    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 8) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "Commanded PGN", '', pgn, pgn_raw))

    # manufacturer_code | Offset: 32, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 
    manufacturer_code_raw = (data_raw >> 32) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Only in PGN when Commanded PGN is proprietary", '', manufacturer_code, manufacturer_code_raw))










    return nmea2000Message

def encode_pgn_126208_nmeaReadFieldsReplyGroupFunction(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126208."""
    data_raw = 0
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GROUP_FUNCTION(f.value) for f in nmea2000Message.fields if f.id == 'function_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Function Code'")
    data_raw |= (field_value & 0xFF) << 0
    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 8
    # manufacturer_code | Offset: 32, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 32
    raise Exception ("PGN 126208 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Industry Code is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Unique ID is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Number of Selection Pairs is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Number of Parameters is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Selection Parameter is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Selection Value is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Parameter is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Value is missing BitLength or BitOffset")
    return data_raw

def decode_pgn_126208_nmeaWriteFieldsGroupFunction(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126208."""
    nmea2000Message = NMEA2000Message(126208, 'nmeaWriteFieldsGroupFunction', 'NMEA - Write Fields group function')
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 5
    function_code_raw = (data_raw >> 0) & 0xFF
    function_code = lookup_GROUP_FUNCTION(function_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('function_code', 'Function Code', "Write Fields", '', function_code, function_code_raw))

    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 8) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "Commanded PGN", '', pgn, pgn_raw))

    # manufacturer_code | Offset: 32, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 
    manufacturer_code_raw = (data_raw >> 32) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Only in PGN when Commanded PGN is proprietary", '', manufacturer_code, manufacturer_code_raw))










    return nmea2000Message

def encode_pgn_126208_nmeaWriteFieldsGroupFunction(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126208."""
    data_raw = 0
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GROUP_FUNCTION(f.value) for f in nmea2000Message.fields if f.id == 'function_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Function Code'")
    data_raw |= (field_value & 0xFF) << 0
    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 8
    # manufacturer_code | Offset: 32, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 32
    raise Exception ("PGN 126208 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Industry Code is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Unique ID is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Number of Selection Pairs is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Number of Parameters is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Selection Parameter is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Selection Value is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Parameter is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Value is missing BitLength or BitOffset")
    return data_raw

def decode_pgn_126208_nmeaWriteFieldsReplyGroupFunction(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126208."""
    nmea2000Message = NMEA2000Message(126208, 'nmeaWriteFieldsReplyGroupFunction', 'NMEA - Write Fields reply group function')
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 6
    function_code_raw = (data_raw >> 0) & 0xFF
    function_code = lookup_GROUP_FUNCTION(function_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('function_code', 'Function Code', "Write Fields Reply", '', function_code, function_code_raw))

    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 8) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "Commanded PGN", '', pgn, pgn_raw))

    # manufacturer_code | Offset: 32, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 
    manufacturer_code_raw = (data_raw >> 32) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Only in PGN when Commanded PGN is proprietary", '', manufacturer_code, manufacturer_code_raw))










    return nmea2000Message

def encode_pgn_126208_nmeaWriteFieldsReplyGroupFunction(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126208."""
    data_raw = 0
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GROUP_FUNCTION(f.value) for f in nmea2000Message.fields if f.id == 'function_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Function Code'")
    data_raw |= (field_value & 0xFF) << 0
    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 8
    # manufacturer_code | Offset: 32, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 32
    raise Exception ("PGN 126208 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Industry Code is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Unique ID is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Number of Selection Pairs is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Number of Parameters is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Selection Parameter is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Selection Value is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Parameter is missing BitLength or BitOffset")
    raise Exception ("PGN 126208 not supporting encoding for now as Value is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_126464() -> bool:
    """Return True if PGN 126464 is a fast PGN."""
    return True
def decode_pgn_126464(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126464."""
    nmea2000Message = NMEA2000Message(126464, 'pgnListTransmitAndReceive', 'PGN List (Transmit and Receive)')
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    function_code_raw = (data_raw >> 0) & 0xFF
    function_code = lookup_PGN_LIST_FUNCTION(function_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('function_code', 'Function Code', "", '', function_code, function_code_raw))

    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 8) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "", '', pgn, pgn_raw))

    return nmea2000Message

def encode_pgn_126464(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126464."""
    data_raw = 0
    # function_code | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_PGN_LIST_FUNCTION(f.value) for f in nmea2000Message.fields if f.id == 'function_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Function Code'")
    data_raw |= (field_value & 0xFF) << 0
    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 8
    return data_raw


def is_fast_pgn_126720() -> bool:
    """Return True if PGN 126720 is a fast PGN."""
    return True
# Complex PGN. number of matches: 29
def decode_pgn_126720(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1851) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFFFF) == 33264) and
        (((data_raw >> 32) & 0xFF) == 132)
        ):
        return decode_pgn_126720_seatalk1PilotMode(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 3)
        ):
        return decode_pgn_126720_fusionMediaControl(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 30)
        ):
        return decode_pgn_126720_fusionSiriusControl(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 1)
        ):
        return decode_pgn_126720_fusionRequestStatus(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 2)
        ):
        return decode_pgn_126720_fusionSetSource(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 23)
        ):
        return decode_pgn_126720_fusionSetMute(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 24)
        ):
        return decode_pgn_126720_fusionSetZoneVolume(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 25)
        ):
        return decode_pgn_126720_fusionSetAllVolumes(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1851) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFFFF) == 33264) and
        (((data_raw >> 32) & 0xFF) == 134)
        ):
        return decode_pgn_126720_seatalk1Keystroke(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1851) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFFFF) == 33264) and
        (((data_raw >> 32) & 0xFF) == 144)
        ):
        return decode_pgn_126720_seatalk1DeviceIdentification(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1851) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFFFF) == 3212) and
        (((data_raw >> 48) & 0xFF) == 0)
        ):
        return decode_pgn_126720_seatalk1DisplayBrightness(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1851) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFFFF) == 3212) and
        (((data_raw >> 48) & 0xFF) == 1)
        ):
        return decode_pgn_126720_seatalk1DisplayColor(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 32)
        ):
        return decode_pgn_126720_airmarAttitudeOffset(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 33)
        ):
        return decode_pgn_126720_airmarCalibrateCompass(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 34)
        ):
        return decode_pgn_126720_airmarTrueWindOptions(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 35)
        ):
        return decode_pgn_126720_airmarSimulateMode(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 40)
        ):
        return decode_pgn_126720_airmarCalibrateDepth(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 41)
        ):
        return decode_pgn_126720_airmarCalibrateSpeed(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 42)
        ):
        return decode_pgn_126720_airmarCalibrateTemperature(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 43) and
        (((data_raw >> 24) & 0xF) == 0)
        ):
        return decode_pgn_126720_airmarSpeedFilterNone(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 43) and
        (((data_raw >> 24) & 0xF) == 1)
        ):
        return decode_pgn_126720_airmarSpeedFilterIir(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 44) and
        (((data_raw >> 24) & 0xF) == 0)
        ):
        return decode_pgn_126720_airmarTemperatureFilterNone(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 44) and
        (((data_raw >> 24) & 0xF) == 1)
        ):
        return decode_pgn_126720_airmarTemperatureFilterIir(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 46)
        ):
        return decode_pgn_126720_airmarNmea2000Options(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 135) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_126720_airmarAddressableMultiFrame(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 137) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_126720_maretronSlaveResponse(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 229) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 222) and
        (((data_raw >> 24) & 0xFF) == 5) and
        (((data_raw >> 32) & 0xFF) == 5) and
        (((data_raw >> 40) & 0xFF) == 5) and
        (((data_raw >> 64) & 0xFF) == 0)
        ):
        return decode_pgn_126720_garminDayMode(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 229) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 222) and
        (((data_raw >> 24) & 0xFF) == 5) and
        (((data_raw >> 32) & 0xFF) == 5) and
        (((data_raw >> 40) & 0xFF) == 5) and
        (((data_raw >> 64) & 0xFF) == 1)
        ):
        return decode_pgn_126720_garminNightMode(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 229) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 222) and
        (((data_raw >> 24) & 0xFF) == 5) and
        (((data_raw >> 32) & 0xFF) == 5) and
        (((data_raw >> 40) & 0xFF) == 5) and
        (((data_raw >> 64) & 0xFF) == 13)
        ):
        return decode_pgn_126720_garminColorMode(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_126720_seatalk1PilotMode(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'seatalk1PilotMode', 'Seatalk1: Pilot Mode')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 33264
    proprietary_id_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    proprietary_id = proprietary_id_raw * 1 if proprietary_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "0x81f0", '', proprietary_id, proprietary_id_raw))

    # command | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 132
    command_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    command = command_raw * 1 if command_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('command', 'command', "0x84", '', command, command_raw))

    # unknown_1 | Offset: 40, Length: 24, Resolution: 1, Field Type: BINARY, Match: 
    unknown_1_raw = (data_raw >> 40) & 0xFFFFFF
    unknown_1 = unknown_1_raw * 1 if unknown_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_1', 'Unknown 1', "", '', unknown_1, unknown_1_raw))

    # pilot_mode | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    pilot_mode_raw = (data_raw >> 64) & 0xFF
    pilot_mode = lookup_SEATALK_PILOT_MODE(pilot_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('pilot_mode', 'Pilot Mode', "", '', pilot_mode, pilot_mode_raw))

    # sub_mode | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sub_mode_raw = decode_number((data_raw >> 72) & 0xFF, 8)
    sub_mode = sub_mode_raw * 1 if sub_mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sub_mode', 'Sub Mode', "", '', sub_mode, sub_mode_raw))

    # pilot_mode_data | Offset: 80, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    pilot_mode_data_raw = (data_raw >> 80) & 0xFF
    pilot_mode_data = pilot_mode_data_raw * 1 if pilot_mode_data_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pilot_mode_data', 'Pilot Mode Data', "", '', pilot_mode_data, pilot_mode_data_raw))

    # unknown_2 | Offset: 88, Length: 80, Resolution: 1, Field Type: BINARY, Match: 
    unknown_2_raw = (data_raw >> 88) & 0xFFFFFFFFFFFFFFFFFFFF
    unknown_2 = unknown_2_raw * 1 if unknown_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_2', 'Unknown 2', "", '', unknown_2, unknown_2_raw))

    return nmea2000Message

def encode_pgn_126720_seatalk1PilotMode(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFFFF) << 16
    # command | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'command'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'command'")
    data_raw |= (field_value & 0xFF) << 32
    # unknown_1 | Offset: 40, Length: 24, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown 1'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    # pilot_mode | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SEATALK_PILOT_MODE(f.value) for f in nmea2000Message.fields if f.id == 'pilot_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Pilot Mode'")
    data_raw |= (field_value & 0xFF) << 64
    # sub_mode | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sub_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sub Mode'")
    data_raw |= (field_value & 0xFF) << 72
    # pilot_mode_data | Offset: 80, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pilot_mode_data'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Pilot Mode Data'")
    data_raw |= (field_value & 0xFF) << 80
    # unknown_2 | Offset: 88, Length: 80, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown 2'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFF) << 88
    return data_raw

def decode_pgn_126720_fusionMediaControl(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'fusionMediaControl', 'Fusion: Media Control')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 3
    proprietary_id_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    proprietary_id = proprietary_id_raw * 1 if proprietary_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Media Control", '', proprietary_id, proprietary_id_raw))

    # unknown | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    unknown_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    unknown = unknown_raw * 1 if unknown_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown', 'Unknown', "", '', unknown, unknown_raw))

    # source_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    source_id_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # command | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    command_raw = (data_raw >> 40) & 0xFF
    command = lookup_FUSION_COMMAND(command_raw)
    nmea2000Message.fields.append(NMEA2000Field('command', 'Command', "", '', command, command_raw))

    return nmea2000Message

def encode_pgn_126720_fusionMediaControl(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # unknown | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown'")
    data_raw |= (field_value & 0xFF) << 24
    # source_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFF) << 32
    # command | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'command'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Command'")
    data_raw |= (field_value & 0xFF) << 40
    return data_raw

def decode_pgn_126720_fusionSiriusControl(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'fusionSiriusControl', 'Fusion: Sirius Control')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 30
    proprietary_id_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    proprietary_id = proprietary_id_raw * 1 if proprietary_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Sirius Control", '', proprietary_id, proprietary_id_raw))

    # unknown | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    unknown_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    unknown = unknown_raw * 1 if unknown_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown', 'Unknown', "", '', unknown, unknown_raw))

    # source_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    source_id_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # command | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    command_raw = (data_raw >> 40) & 0xFF
    command = lookup_FUSION_SIRIUS_COMMAND(command_raw)
    nmea2000Message.fields.append(NMEA2000Field('command', 'Command', "", '', command, command_raw))

    return nmea2000Message

def encode_pgn_126720_fusionSiriusControl(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # unknown | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown'")
    data_raw |= (field_value & 0xFF) << 24
    # source_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFF) << 32
    # command | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_SIRIUS_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'command'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Command'")
    data_raw |= (field_value & 0xFF) << 40
    return data_raw

def decode_pgn_126720_fusionRequestStatus(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'fusionRequestStatus', 'Fusion: Request Status')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 1
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_FUSION_MESSAGE_ID(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Request Status", '', proprietary_id, proprietary_id_raw))

    # unknown | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    unknown_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    unknown = unknown_raw * 1 if unknown_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown', 'Unknown', "", '', unknown, unknown_raw))

    return nmea2000Message

def encode_pgn_126720_fusionRequestStatus(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # unknown | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown'")
    data_raw |= (field_value & 0xFF) << 24
    return data_raw

def decode_pgn_126720_fusionSetSource(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'fusionSetSource', 'Fusion: Set Source')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 2
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_FUSION_MESSAGE_ID(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Source", '', proprietary_id, proprietary_id_raw))

    # unknown | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    unknown_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    unknown = unknown_raw * 1 if unknown_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown', 'Unknown', "", '', unknown, unknown_raw))

    # source_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    source_id_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    return nmea2000Message

def encode_pgn_126720_fusionSetSource(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # unknown | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown'")
    data_raw |= (field_value & 0xFF) << 24
    # source_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFF) << 32
    return data_raw

def decode_pgn_126720_fusionSetMute(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'fusionSetMute', 'Fusion: Set Mute')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 23
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_FUSION_MESSAGE_ID(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Mute", '', proprietary_id, proprietary_id_raw))

    # command | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    command_raw = (data_raw >> 24) & 0xFF
    command = lookup_FUSION_MUTE_COMMAND(command_raw)
    nmea2000Message.fields.append(NMEA2000Field('command', 'Command', "", '', command, command_raw))

    return nmea2000Message

def encode_pgn_126720_fusionSetMute(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # command | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MUTE_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'command'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Command'")
    data_raw |= (field_value & 0xFF) << 24
    return data_raw

def decode_pgn_126720_fusionSetZoneVolume(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'fusionSetZoneVolume', 'Fusion: Set Zone Volume')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 24
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_FUSION_MESSAGE_ID(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Set Zone Volume", '', proprietary_id, proprietary_id_raw))

    # unknown | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    unknown_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    unknown = unknown_raw * 1 if unknown_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown', 'Unknown', "", '', unknown, unknown_raw))

    # zone | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    zone = zone_raw * 1 if zone_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone', 'Zone', "", '', zone, zone_raw))

    # volume | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    volume_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    volume = volume_raw * 1 if volume_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('volume', 'Volume', "", '', volume, volume_raw))

    return nmea2000Message

def encode_pgn_126720_fusionSetZoneVolume(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # unknown | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown'")
    data_raw |= (field_value & 0xFF) << 24
    # zone | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone'")
    data_raw |= (field_value & 0xFF) << 32
    # volume | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'volume'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Volume'")
    data_raw |= (field_value & 0xFF) << 40
    return data_raw

def decode_pgn_126720_fusionSetAllVolumes(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'fusionSetAllVolumes', 'Fusion: Set All Volumes')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 25
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_FUSION_MESSAGE_ID(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Set All Volumes", '', proprietary_id, proprietary_id_raw))

    # unknown | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    unknown_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    unknown = unknown_raw * 1 if unknown_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown', 'Unknown', "", '', unknown, unknown_raw))

    # zone1 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone1_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    zone1 = zone1_raw * 1 if zone1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone1', 'Zone1', "", '', zone1, zone1_raw))

    # zone2 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone2_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    zone2 = zone2_raw * 1 if zone2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone2', 'Zone2', "", '', zone2, zone2_raw))

    # zone3 | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone3_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    zone3 = zone3_raw * 1 if zone3_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone3', 'Zone3', "", '', zone3, zone3_raw))

    # zone4 | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone4_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    zone4 = zone4_raw * 1 if zone4_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone4', 'Zone4', "", '', zone4, zone4_raw))

    return nmea2000Message

def encode_pgn_126720_fusionSetAllVolumes(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # unknown | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown'")
    data_raw |= (field_value & 0xFF) << 24
    # zone1 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone1'")
    data_raw |= (field_value & 0xFF) << 32
    # zone2 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone2'")
    data_raw |= (field_value & 0xFF) << 40
    # zone3 | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone3'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone3'")
    data_raw |= (field_value & 0xFF) << 48
    # zone4 | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone4'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw

def decode_pgn_126720_seatalk1Keystroke(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'seatalk1Keystroke', 'Seatalk1: Keystroke')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 33264
    proprietary_id_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    proprietary_id = proprietary_id_raw * 1 if proprietary_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "0x81f0", '', proprietary_id, proprietary_id_raw))

    # command | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 134
    command_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    command = command_raw * 1 if command_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('command', 'command', "0x86", '', command, command_raw))

    # device | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    device_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    device = device_raw * 1 if device_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('device', 'device', "", '', device, device_raw))

    # key | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    key_raw = (data_raw >> 48) & 0xFF
    key = lookup_SEATALK_KEYSTROKE(key_raw)
    nmea2000Message.fields.append(NMEA2000Field('key', 'key', "", '', key, key_raw))

    # keyinverted | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    keyinverted_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    keyinverted = keyinverted_raw * 1 if keyinverted_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('keyinverted', 'keyInverted', "Bit negated version of key", '', keyinverted, keyinverted_raw))

    # unknown_data | Offset: 64, Length: 112, Resolution: 1, Field Type: BINARY, Match: 
    unknown_data_raw = (data_raw >> 64) & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    unknown_data = unknown_data_raw * 1 if unknown_data_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_data', 'Unknown data', "", '', unknown_data, unknown_data_raw))

    return nmea2000Message

def encode_pgn_126720_seatalk1Keystroke(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFFFF) << 16
    # command | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'command'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'command'")
    data_raw |= (field_value & 0xFF) << 32
    # device | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'device'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'device'")
    data_raw |= (field_value & 0xFF) << 40
    # key | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SEATALK_KEYSTROKE(f.value) for f in nmea2000Message.fields if f.id == 'key'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'key'")
    data_raw |= (field_value & 0xFF) << 48
    # keyinverted | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'keyinverted'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'keyInverted'")
    data_raw |= (field_value & 0xFF) << 56
    # unknown_data | Offset: 64, Length: 112, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_data'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown data'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 64
    return data_raw

def decode_pgn_126720_seatalk1DeviceIdentification(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'seatalk1DeviceIdentification', 'Seatalk1: Device Identification')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 33264
    proprietary_id_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    proprietary_id = proprietary_id_raw * 1 if proprietary_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "0x81f0", '', proprietary_id, proprietary_id_raw))

    # command | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 144
    command_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    command = command_raw * 1 if command_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('command', 'command', "0x90", '', command, command_raw))

    # reserved_40 | Offset: 40, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0xFF
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    # device | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    device_raw = (data_raw >> 48) & 0xFF
    device = lookup_SEATALK_DEVICE_ID(device_raw)
    nmea2000Message.fields.append(NMEA2000Field('device', 'device', "", '', device, device_raw))

    return nmea2000Message

def encode_pgn_126720_seatalk1DeviceIdentification(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFFFF) << 16
    # command | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'command'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'command'")
    data_raw |= (field_value & 0xFF) << 32
    # reserved_40 | Offset: 40, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 40
    # device | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SEATALK_DEVICE_ID(f.value) for f in nmea2000Message.fields if f.id == 'device'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'device'")
    data_raw |= (field_value & 0xFF) << 48
    return data_raw

def decode_pgn_126720_seatalk1DisplayBrightness(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'seatalk1DisplayBrightness', 'Seatalk1: Display Brightness')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 3212
    proprietary_id_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    proprietary_id = proprietary_id_raw * 1 if proprietary_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "0x0c8c", '', proprietary_id, proprietary_id_raw))

    # group | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    group_raw = (data_raw >> 32) & 0xFF
    group = lookup_SEATALK_NETWORK_GROUP(group_raw)
    nmea2000Message.fields.append(NMEA2000Field('group', 'Group', "", '', group, group_raw))

    # unknown_1 | Offset: 40, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    unknown_1_raw = (data_raw >> 40) & 0xFF
    unknown_1 = unknown_1_raw * 1 if unknown_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_1', 'Unknown 1', "", '', unknown_1, unknown_1_raw))

    # command | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 0
    command_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    command = command_raw * 1 if command_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('command', 'Command', "Brightness", '', command, command_raw))

    # brightness | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    brightness_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    brightness = brightness_raw * 1 if brightness_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('brightness', 'Brightness', "", '%', brightness, brightness_raw))

    # unknown_2 | Offset: 64, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    unknown_2_raw = (data_raw >> 64) & 0xFF
    unknown_2 = unknown_2_raw * 1 if unknown_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_2', 'Unknown 2', "", '', unknown_2, unknown_2_raw))

    return nmea2000Message

def encode_pgn_126720_seatalk1DisplayBrightness(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFFFF) << 16
    # group | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SEATALK_NETWORK_GROUP(f.value) for f in nmea2000Message.fields if f.id == 'group'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group'")
    data_raw |= (field_value & 0xFF) << 32
    # unknown_1 | Offset: 40, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown 1'")
    data_raw |= (field_value & 0xFF) << 40
    # command | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'command'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Command'")
    data_raw |= (field_value & 0xFF) << 48
    # brightness | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'brightness'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Brightness'")
    data_raw |= (field_value & 0xFF) << 56
    # unknown_2 | Offset: 64, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown 2'")
    data_raw |= (field_value & 0xFF) << 64
    return data_raw

def decode_pgn_126720_seatalk1DisplayColor(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'seatalk1DisplayColor', 'Seatalk1: Display Color')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 3212
    proprietary_id_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    proprietary_id = proprietary_id_raw * 1 if proprietary_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "0x0c8c", '', proprietary_id, proprietary_id_raw))

    # group | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    group_raw = (data_raw >> 32) & 0xFF
    group = lookup_SEATALK_NETWORK_GROUP(group_raw)
    nmea2000Message.fields.append(NMEA2000Field('group', 'Group', "", '', group, group_raw))

    # unknown_1 | Offset: 40, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    unknown_1_raw = (data_raw >> 40) & 0xFF
    unknown_1 = unknown_1_raw * 1 if unknown_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_1', 'Unknown 1', "", '', unknown_1, unknown_1_raw))

    # command | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 1
    command_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    command = command_raw * 1 if command_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('command', 'Command', "Color", '', command, command_raw))

    # color | Offset: 56, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    color_raw = (data_raw >> 56) & 0xFF
    color = lookup_SEATALK_DISPLAY_COLOR(color_raw)
    nmea2000Message.fields.append(NMEA2000Field('color', 'Color', "", '', color, color_raw))

    # unknown_2 | Offset: 64, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    unknown_2_raw = (data_raw >> 64) & 0xFF
    unknown_2 = unknown_2_raw * 1 if unknown_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_2', 'Unknown 2', "", '', unknown_2, unknown_2_raw))

    return nmea2000Message

def encode_pgn_126720_seatalk1DisplayColor(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFFFF) << 16
    # group | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SEATALK_NETWORK_GROUP(f.value) for f in nmea2000Message.fields if f.id == 'group'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group'")
    data_raw |= (field_value & 0xFF) << 32
    # unknown_1 | Offset: 40, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown 1'")
    data_raw |= (field_value & 0xFF) << 40
    # command | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'command'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Command'")
    data_raw |= (field_value & 0xFF) << 48
    # color | Offset: 56, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SEATALK_DISPLAY_COLOR(f.value) for f in nmea2000Message.fields if f.id == 'color'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Color'")
    data_raw |= (field_value & 0xFF) << 56
    # unknown_2 | Offset: 64, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown 2'")
    data_raw |= (field_value & 0xFF) << 64
    return data_raw

def decode_pgn_126720_airmarAttitudeOffset(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'airmarAttitudeOffset', 'Airmar: Attitude Offset')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 32
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_AIRMAR_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Attitude Offsets", '', proprietary_id, proprietary_id_raw))

    # azimuth_offset | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    azimuth_offset_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    if azimuth_offset_raw is not None and azimuth_offset_raw & (1 << (16 - 1)):
        azimuth_offset_raw -= (1 << 16)
    azimuth_offset = azimuth_offset_raw * 0.0001 if azimuth_offset_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('azimuth_offset', 'Azimuth offset', "Positive: sensor rotated to port, negative: sensor rotated to starboard", 'rad', azimuth_offset, azimuth_offset_raw))

    # pitch_offset | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    pitch_offset_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    if pitch_offset_raw is not None and pitch_offset_raw & (1 << (16 - 1)):
        pitch_offset_raw -= (1 << 16)
    pitch_offset = pitch_offset_raw * 0.0001 if pitch_offset_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pitch_offset', 'Pitch offset', "Positive: sensor tilted to bow, negative: sensor tilted to stern", 'rad', pitch_offset, pitch_offset_raw))

    # roll_offset | Offset: 56, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    roll_offset_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    if roll_offset_raw is not None and roll_offset_raw & (1 << (16 - 1)):
        roll_offset_raw -= (1 << 16)
    roll_offset = roll_offset_raw * 0.0001 if roll_offset_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('roll_offset', 'Roll offset', "Positive: sensor tilted to port, negative: sensor tilted to starboard", 'rad', roll_offset, roll_offset_raw))

    return nmea2000Message

def encode_pgn_126720_airmarAttitudeOffset(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # azimuth_offset | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'azimuth_offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Azimuth offset'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 24
    
    # pitch_offset | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pitch_offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Pitch offset'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 40
    
    # roll_offset | Offset: 56, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'roll_offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Roll offset'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 56
    
    return data_raw

def decode_pgn_126720_airmarCalibrateCompass(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'airmarCalibrateCompass', 'Airmar: Calibrate Compass')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 33
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_AIRMAR_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Calibrate Compass", '', proprietary_id, proprietary_id_raw))

    # calibrate_function | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    calibrate_function_raw = (data_raw >> 24) & 0xFF
    calibrate_function = lookup_AIRMAR_CALIBRATE_FUNCTION(calibrate_function_raw)
    nmea2000Message.fields.append(NMEA2000Field('calibrate_function', 'Calibrate Function', "", '', calibrate_function, calibrate_function_raw))

    # calibration_status | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    calibration_status_raw = (data_raw >> 32) & 0xFF
    calibration_status = lookup_AIRMAR_CALIBRATE_STATUS(calibration_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('calibration_status', 'Calibration Status', "", '', calibration_status, calibration_status_raw))

    # verify_score | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    verify_score_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    verify_score = verify_score_raw * 1 if verify_score_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('verify_score', 'Verify Score', "TBD", '', verify_score, verify_score_raw))

    # x_axis_gain_value | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    x_axis_gain_value_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    if x_axis_gain_value_raw is not None and x_axis_gain_value_raw & (1 << (16 - 1)):
        x_axis_gain_value_raw -= (1 << 16)
    x_axis_gain_value = x_axis_gain_value_raw * 0.01 if x_axis_gain_value_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('x_axis_gain_value', 'X-axis gain value', "default 100, range 50 to 500", '', x_axis_gain_value, x_axis_gain_value_raw))

    # y_axis_gain_value | Offset: 64, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    y_axis_gain_value_raw = decode_number((data_raw >> 64) & 0xFFFF, 16)
    if y_axis_gain_value_raw is not None and y_axis_gain_value_raw & (1 << (16 - 1)):
        y_axis_gain_value_raw -= (1 << 16)
    y_axis_gain_value = y_axis_gain_value_raw * 0.01 if y_axis_gain_value_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('y_axis_gain_value', 'Y-axis gain value', "default 100, range 50 to 500", '', y_axis_gain_value, y_axis_gain_value_raw))

    # z_axis_gain_value | Offset: 80, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    z_axis_gain_value_raw = decode_number((data_raw >> 80) & 0xFFFF, 16)
    if z_axis_gain_value_raw is not None and z_axis_gain_value_raw & (1 << (16 - 1)):
        z_axis_gain_value_raw -= (1 << 16)
    z_axis_gain_value = z_axis_gain_value_raw * 0.01 if z_axis_gain_value_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('z_axis_gain_value', 'Z-axis gain value', "default 100, range 50 to 500", '', z_axis_gain_value, z_axis_gain_value_raw))

    # x_axis_linear_offset | Offset: 96, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    x_axis_linear_offset_raw = decode_number((data_raw >> 96) & 0xFFFF, 16)
    if x_axis_linear_offset_raw is not None and x_axis_linear_offset_raw & (1 << (16 - 1)):
        x_axis_linear_offset_raw -= (1 << 16)
    x_axis_linear_offset = x_axis_linear_offset_raw * 0.01 if x_axis_linear_offset_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('x_axis_linear_offset', 'X-axis linear offset', "", 'T', x_axis_linear_offset, x_axis_linear_offset_raw))

    # y_axis_linear_offset | Offset: 112, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    y_axis_linear_offset_raw = decode_number((data_raw >> 112) & 0xFFFF, 16)
    if y_axis_linear_offset_raw is not None and y_axis_linear_offset_raw & (1 << (16 - 1)):
        y_axis_linear_offset_raw -= (1 << 16)
    y_axis_linear_offset = y_axis_linear_offset_raw * 0.01 if y_axis_linear_offset_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('y_axis_linear_offset', 'Y-axis linear offset', "", 'T', y_axis_linear_offset, y_axis_linear_offset_raw))

    # z_axis_linear_offset | Offset: 128, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    z_axis_linear_offset_raw = decode_number((data_raw >> 128) & 0xFFFF, 16)
    if z_axis_linear_offset_raw is not None and z_axis_linear_offset_raw & (1 << (16 - 1)):
        z_axis_linear_offset_raw -= (1 << 16)
    z_axis_linear_offset = z_axis_linear_offset_raw * 0.01 if z_axis_linear_offset_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('z_axis_linear_offset', 'Z-axis linear offset', "", 'T', z_axis_linear_offset, z_axis_linear_offset_raw))

    # x_axis_angular_offset | Offset: 144, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    x_axis_angular_offset_raw = decode_number((data_raw >> 144) & 0xFFFF, 16)
    if x_axis_angular_offset_raw is not None and x_axis_angular_offset_raw & (1 << (16 - 1)):
        x_axis_angular_offset_raw -= (1 << 16)
    x_axis_angular_offset = x_axis_angular_offset_raw * 0.1 if x_axis_angular_offset_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('x_axis_angular_offset', 'X-axis angular offset', "", 'deg', x_axis_angular_offset, x_axis_angular_offset_raw))

    # pitch_and_roll_damping | Offset: 160, Length: 16, Resolution: 0.05, Field Type: TIME, Match: 
    pitch_and_roll_damping_raw = (data_raw >> 160) & 0xFFFF
    if pitch_and_roll_damping_raw is not None and pitch_and_roll_damping_raw & (1 << (16 - 1)):
        pitch_and_roll_damping_raw -= (1 << 16)
    pitch_and_roll_damping = decode_time(pitch_and_roll_damping_raw * 0.05)
    nmea2000Message.fields.append(NMEA2000Field('pitch_and_roll_damping', 'Pitch and Roll damping', "default 30, range 0 to 200", 's', pitch_and_roll_damping, pitch_and_roll_damping_raw))

    # compass_rate_gyro_damping | Offset: 176, Length: 16, Resolution: 0.05, Field Type: TIME, Match: 
    compass_rate_gyro_damping_raw = (data_raw >> 176) & 0xFFFF
    if compass_rate_gyro_damping_raw is not None and compass_rate_gyro_damping_raw & (1 << (16 - 1)):
        compass_rate_gyro_damping_raw -= (1 << 16)
    compass_rate_gyro_damping = decode_time(compass_rate_gyro_damping_raw * 0.05)
    nmea2000Message.fields.append(NMEA2000Field('compass_rate_gyro_damping', 'Compass/Rate gyro damping', "default -30, range -2400 to 2400, negative indicates rate gyro is to be used in compass calculations", 's', compass_rate_gyro_damping, compass_rate_gyro_damping_raw))

    return nmea2000Message

def encode_pgn_126720_airmarCalibrateCompass(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # calibrate_function | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_CALIBRATE_FUNCTION(f.value) for f in nmea2000Message.fields if f.id == 'calibrate_function'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Calibrate Function'")
    data_raw |= (field_value & 0xFF) << 24
    # calibration_status | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_CALIBRATE_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'calibration_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Calibration Status'")
    data_raw |= (field_value & 0xFF) << 32
    # verify_score | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'verify_score'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Verify Score'")
    data_raw |= (field_value & 0xFF) << 40
    # x_axis_gain_value | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'x_axis_gain_value'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'X-axis gain value'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 48
    
    # y_axis_gain_value | Offset: 64, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'y_axis_gain_value'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Y-axis gain value'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 64
    
    # z_axis_gain_value | Offset: 80, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'z_axis_gain_value'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Z-axis gain value'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 80
    
    # x_axis_linear_offset | Offset: 96, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'x_axis_linear_offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'X-axis linear offset'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 96
    
    # y_axis_linear_offset | Offset: 112, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'y_axis_linear_offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Y-axis linear offset'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 112
    
    # z_axis_linear_offset | Offset: 128, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'z_axis_linear_offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Z-axis linear offset'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 128
    
    # x_axis_angular_offset | Offset: 144, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'x_axis_angular_offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'X-axis angular offset'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 144
    
    # pitch_and_roll_damping | Offset: 160, Length: 16, Resolution: 0.05, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pitch_and_roll_damping'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Pitch and Roll damping'")        
    data_raw |= (int(field_value / 0.05) & 0xFFFF) << 160
    
    # compass_rate_gyro_damping | Offset: 176, Length: 16, Resolution: 0.05, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'compass_rate_gyro_damping'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Compass/Rate gyro damping'")        
    data_raw |= (int(field_value / 0.05) & 0xFFFF) << 176
    
    return data_raw

def decode_pgn_126720_airmarTrueWindOptions(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'airmarTrueWindOptions', 'Airmar: True Wind Options')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 34
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_AIRMAR_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "True Wind Options", '', proprietary_id, proprietary_id_raw))

    # cog_substitution_for_hdg | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    cog_substitution_for_hdg_raw = (data_raw >> 24) & 0x3
    cog_substitution_for_hdg = lookup_YES_NO(cog_substitution_for_hdg_raw)
    nmea2000Message.fields.append(NMEA2000Field('cog_substitution_for_hdg', 'COG substitution for HDG', "Allow use of COG when HDG not available?", '', cog_substitution_for_hdg, cog_substitution_for_hdg_raw))

    # reserved_26 | Offset: 26, Length: 22, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_26_raw = (data_raw >> 26) & 0x3FFFFF
    reserved_26 = reserved_26_raw * 1 if reserved_26_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_26', 'Reserved', "", '', reserved_26, reserved_26_raw))

    return nmea2000Message

def encode_pgn_126720_airmarTrueWindOptions(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # cog_substitution_for_hdg | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'cog_substitution_for_hdg'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'COG substitution for HDG'")
    data_raw |= (field_value & 0x3) << 24
    # reserved_26 | Offset: 26, Length: 22, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_26'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3FFFFF) << 26
    return data_raw

def decode_pgn_126720_airmarSimulateMode(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'airmarSimulateMode', 'Airmar: Simulate Mode')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 35
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_AIRMAR_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Simulate Mode", '', proprietary_id, proprietary_id_raw))

    # simulate_mode | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    simulate_mode_raw = (data_raw >> 24) & 0x3
    simulate_mode = lookup_OFF_ON(simulate_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('simulate_mode', 'Simulate Mode', "", '', simulate_mode, simulate_mode_raw))

    # reserved_26 | Offset: 26, Length: 22, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_26_raw = (data_raw >> 26) & 0x3FFFFF
    reserved_26 = reserved_26_raw * 1 if reserved_26_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_26', 'Reserved', "", '', reserved_26, reserved_26_raw))

    return nmea2000Message

def encode_pgn_126720_airmarSimulateMode(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # simulate_mode | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'simulate_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Simulate Mode'")
    data_raw |= (field_value & 0x3) << 24
    # reserved_26 | Offset: 26, Length: 22, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_26'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3FFFFF) << 26
    return data_raw

def decode_pgn_126720_airmarCalibrateDepth(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'airmarCalibrateDepth', 'Airmar: Calibrate Depth')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 40
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_AIRMAR_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Calibrate Depth", '', proprietary_id, proprietary_id_raw))

    # speed_of_sound_mode | Offset: 24, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    speed_of_sound_mode_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    speed_of_sound_mode = speed_of_sound_mode_raw * 0.1 if speed_of_sound_mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('speed_of_sound_mode', 'Speed of Sound Mode', "actual allowed range is 1350.0 to 1650.0 m/s", 'm/s', speed_of_sound_mode, speed_of_sound_mode_raw))

    # reserved_40 | Offset: 40, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0xFF
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    return nmea2000Message

def encode_pgn_126720_airmarCalibrateDepth(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # speed_of_sound_mode | Offset: 24, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'speed_of_sound_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Speed of Sound Mode'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 24
    
    # reserved_40 | Offset: 40, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 40
    return data_raw

def decode_pgn_126720_airmarCalibrateSpeed(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'airmarCalibrateSpeed', 'Airmar: Calibrate Speed')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 41
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_AIRMAR_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Calibrate Speed", '', proprietary_id, proprietary_id_raw))

    # number_of_pairs_of_data_points | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_pairs_of_data_points_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    number_of_pairs_of_data_points = number_of_pairs_of_data_points_raw * 1 if number_of_pairs_of_data_points_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_pairs_of_data_points', 'Number of pairs of data points', "actual range is 0 to 25. 254=restore default speed curve", '', number_of_pairs_of_data_points, number_of_pairs_of_data_points_raw))

    # input_frequency | Offset: 32, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    input_frequency_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    input_frequency = input_frequency_raw * 0.1 if input_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('input_frequency', 'Input frequency', "", 'Hz', input_frequency, input_frequency_raw))

    # output_speed | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    output_speed_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    output_speed = output_speed_raw * 0.01 if output_speed_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('output_speed', 'Output speed', "", 'm/s', output_speed, output_speed_raw))

    return nmea2000Message

def encode_pgn_126720_airmarCalibrateSpeed(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # number_of_pairs_of_data_points | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_pairs_of_data_points'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of pairs of data points'")
    data_raw |= (field_value & 0xFF) << 24
    # input_frequency | Offset: 32, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'input_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Input frequency'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 32
    
    # output_speed | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'output_speed'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Output speed'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 48
    
    return data_raw

def decode_pgn_126720_airmarCalibrateTemperature(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'airmarCalibrateTemperature', 'Airmar: Calibrate Temperature')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 42
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_AIRMAR_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Calibrate Temperature", '', proprietary_id, proprietary_id_raw))

    # temperature_instance | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    temperature_instance_raw = (data_raw >> 24) & 0x3
    temperature_instance = lookup_AIRMAR_TEMPERATURE_INSTANCE(temperature_instance_raw)
    nmea2000Message.fields.append(NMEA2000Field('temperature_instance', 'Temperature instance', "", '', temperature_instance, temperature_instance_raw))

    # reserved_26 | Offset: 26, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_26_raw = (data_raw >> 26) & 0x3F
    reserved_26 = reserved_26_raw * 1 if reserved_26_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_26', 'Reserved', "", '', reserved_26, reserved_26_raw))

    # temperature_offset | Offset: 32, Length: 16, Resolution: 0.001, Field Type: NUMBER, Match: 
    temperature_offset_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    if temperature_offset_raw is not None and temperature_offset_raw & (1 << (16 - 1)):
        temperature_offset_raw -= (1 << 16)
    temperature_offset = temperature_offset_raw * 0.001 if temperature_offset_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('temperature_offset', 'Temperature offset', "actual range is -9.999 to +9.999 K", 'K', temperature_offset, temperature_offset_raw))

    return nmea2000Message

def encode_pgn_126720_airmarCalibrateTemperature(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # temperature_instance | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_TEMPERATURE_INSTANCE(f.value) for f in nmea2000Message.fields if f.id == 'temperature_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temperature instance'")
    data_raw |= (field_value & 0x3) << 24
    # reserved_26 | Offset: 26, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_26'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 26
    # temperature_offset | Offset: 32, Length: 16, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'temperature_offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temperature offset'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 32
    
    return data_raw

def decode_pgn_126720_airmarSpeedFilterNone(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'airmarSpeedFilterNone', 'Airmar: Speed Filter None')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 43
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_AIRMAR_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Speed Filter", '', proprietary_id, proprietary_id_raw))

    # filter_type | Offset: 24, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 0
    filter_type_raw = decode_number((data_raw >> 24) & 0xF, 4)
    filter_type = filter_type_raw * 1 if filter_type_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('filter_type', 'Filter type', "No filter", '', filter_type, filter_type_raw))

    # reserved_28 | Offset: 28, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_28_raw = (data_raw >> 28) & 0xF
    reserved_28 = reserved_28_raw * 1 if reserved_28_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_28', 'Reserved', "", '', reserved_28, reserved_28_raw))

    # sample_interval | Offset: 32, Length: 16, Resolution: 0.01, Field Type: TIME, Match: 
    sample_interval_raw = (data_raw >> 32) & 0xFFFF
    sample_interval = decode_time(sample_interval_raw * 0.01)
    nmea2000Message.fields.append(NMEA2000Field('sample_interval', 'Sample interval', "Interval of time between successive samples of the paddlewheel pulse accumulator", 's', sample_interval, sample_interval_raw))

    return nmea2000Message

def encode_pgn_126720_airmarSpeedFilterNone(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # filter_type | Offset: 24, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'filter_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Filter type'")
    data_raw |= (field_value & 0xF) << 24
    # reserved_28 | Offset: 28, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_28'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 28
    # sample_interval | Offset: 32, Length: 16, Resolution: 0.01, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sample_interval'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sample interval'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 32
    
    return data_raw

def decode_pgn_126720_airmarSpeedFilterIir(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'airmarSpeedFilterIir', 'Airmar: Speed Filter IIR')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 43
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_AIRMAR_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Speed Filter", '', proprietary_id, proprietary_id_raw))

    # filter_type | Offset: 24, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 1
    filter_type_raw = decode_number((data_raw >> 24) & 0xF, 4)
    filter_type = filter_type_raw * 1 if filter_type_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('filter_type', 'Filter type', "IIR filter", '', filter_type, filter_type_raw))

    # reserved_28 | Offset: 28, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_28_raw = (data_raw >> 28) & 0xF
    reserved_28 = reserved_28_raw * 1 if reserved_28_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_28', 'Reserved', "", '', reserved_28, reserved_28_raw))

    # sample_interval | Offset: 32, Length: 16, Resolution: 0.01, Field Type: TIME, Match: 
    sample_interval_raw = (data_raw >> 32) & 0xFFFF
    sample_interval = decode_time(sample_interval_raw * 0.01)
    nmea2000Message.fields.append(NMEA2000Field('sample_interval', 'Sample interval', "Interval of time between successive samples of the paddlewheel pulse accumulator", 's', sample_interval, sample_interval_raw))

    # filter_duration | Offset: 48, Length: 16, Resolution: 0.01, Field Type: TIME, Match: 
    filter_duration_raw = (data_raw >> 48) & 0xFFFF
    filter_duration = decode_time(filter_duration_raw * 0.01)
    nmea2000Message.fields.append(NMEA2000Field('filter_duration', 'Filter duration', "Duration of filter, must be bigger than the sample interval", 's', filter_duration, filter_duration_raw))

    return nmea2000Message

def encode_pgn_126720_airmarSpeedFilterIir(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # filter_type | Offset: 24, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'filter_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Filter type'")
    data_raw |= (field_value & 0xF) << 24
    # reserved_28 | Offset: 28, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_28'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 28
    # sample_interval | Offset: 32, Length: 16, Resolution: 0.01, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sample_interval'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sample interval'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 32
    
    # filter_duration | Offset: 48, Length: 16, Resolution: 0.01, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'filter_duration'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Filter duration'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 48
    
    return data_raw

def decode_pgn_126720_airmarTemperatureFilterNone(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'airmarTemperatureFilterNone', 'Airmar: Temperature Filter None')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 44
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_AIRMAR_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Temperature Filter", '', proprietary_id, proprietary_id_raw))

    # filter_type | Offset: 24, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 0
    filter_type_raw = decode_number((data_raw >> 24) & 0xF, 4)
    filter_type = filter_type_raw * 1 if filter_type_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('filter_type', 'Filter type', "No filter", '', filter_type, filter_type_raw))

    # reserved_28 | Offset: 28, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_28_raw = (data_raw >> 28) & 0xF
    reserved_28 = reserved_28_raw * 1 if reserved_28_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_28', 'Reserved', "", '', reserved_28, reserved_28_raw))

    # sample_interval | Offset: 32, Length: 16, Resolution: 0.01, Field Type: TIME, Match: 
    sample_interval_raw = (data_raw >> 32) & 0xFFFF
    sample_interval = decode_time(sample_interval_raw * 0.01)
    nmea2000Message.fields.append(NMEA2000Field('sample_interval', 'Sample interval', "Interval of time between successive samples of the water temperature thermistor", 's', sample_interval, sample_interval_raw))

    return nmea2000Message

def encode_pgn_126720_airmarTemperatureFilterNone(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # filter_type | Offset: 24, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'filter_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Filter type'")
    data_raw |= (field_value & 0xF) << 24
    # reserved_28 | Offset: 28, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_28'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 28
    # sample_interval | Offset: 32, Length: 16, Resolution: 0.01, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sample_interval'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sample interval'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 32
    
    return data_raw

def decode_pgn_126720_airmarTemperatureFilterIir(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'airmarTemperatureFilterIir', 'Airmar: Temperature Filter IIR')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 44
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_AIRMAR_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Temperature Filter", '', proprietary_id, proprietary_id_raw))

    # filter_type | Offset: 24, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 1
    filter_type_raw = decode_number((data_raw >> 24) & 0xF, 4)
    filter_type = filter_type_raw * 1 if filter_type_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('filter_type', 'Filter type', "IIR filter", '', filter_type, filter_type_raw))

    # reserved_28 | Offset: 28, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_28_raw = (data_raw >> 28) & 0xF
    reserved_28 = reserved_28_raw * 1 if reserved_28_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_28', 'Reserved', "", '', reserved_28, reserved_28_raw))

    # sample_interval | Offset: 32, Length: 16, Resolution: 0.01, Field Type: TIME, Match: 
    sample_interval_raw = (data_raw >> 32) & 0xFFFF
    sample_interval = decode_time(sample_interval_raw * 0.01)
    nmea2000Message.fields.append(NMEA2000Field('sample_interval', 'Sample interval', "Interval of time between successive samples of the water temperature thermistor", 's', sample_interval, sample_interval_raw))

    # filter_duration | Offset: 48, Length: 16, Resolution: 0.01, Field Type: TIME, Match: 
    filter_duration_raw = (data_raw >> 48) & 0xFFFF
    filter_duration = decode_time(filter_duration_raw * 0.01)
    nmea2000Message.fields.append(NMEA2000Field('filter_duration', 'Filter duration', "Duration of filter, must be bigger than the sample interval", 's', filter_duration, filter_duration_raw))

    return nmea2000Message

def encode_pgn_126720_airmarTemperatureFilterIir(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # filter_type | Offset: 24, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'filter_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Filter type'")
    data_raw |= (field_value & 0xF) << 24
    # reserved_28 | Offset: 28, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_28'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 28
    # sample_interval | Offset: 32, Length: 16, Resolution: 0.01, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sample_interval'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sample interval'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 32
    
    # filter_duration | Offset: 48, Length: 16, Resolution: 0.01, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'filter_duration'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Filter duration'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 48
    
    return data_raw

def decode_pgn_126720_airmarNmea2000Options(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'airmarNmea2000Options', 'Airmar: NMEA 2000 options')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 46
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_AIRMAR_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "NMEA 2000 options", '', proprietary_id, proprietary_id_raw))

    # transmission_interval | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    transmission_interval_raw = (data_raw >> 24) & 0x3
    transmission_interval = lookup_AIRMAR_TRANSMISSION_INTERVAL(transmission_interval_raw)
    nmea2000Message.fields.append(NMEA2000Field('transmission_interval', 'Transmission Interval', "", '', transmission_interval, transmission_interval_raw))

    # reserved_26 | Offset: 26, Length: 22, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_26_raw = (data_raw >> 26) & 0x3FFFFF
    reserved_26 = reserved_26_raw * 1 if reserved_26_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_26', 'Reserved', "", '', reserved_26, reserved_26_raw))

    return nmea2000Message

def encode_pgn_126720_airmarNmea2000Options(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # transmission_interval | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_TRANSMISSION_INTERVAL(f.value) for f in nmea2000Message.fields if f.id == 'transmission_interval'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Transmission Interval'")
    data_raw |= (field_value & 0x3) << 24
    # reserved_26 | Offset: 26, Length: 22, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_26'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3FFFFF) << 26
    return data_raw

def decode_pgn_126720_airmarAddressableMultiFrame(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'airmarAddressableMultiFrame', 'Airmar: Addressable Multi-Frame')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    proprietary_id_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    proprietary_id = proprietary_id_raw * 1 if proprietary_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "", '', proprietary_id, proprietary_id_raw))

    return nmea2000Message

def encode_pgn_126720_airmarAddressableMultiFrame(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    return data_raw

def decode_pgn_126720_maretronSlaveResponse(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'maretronSlaveResponse', 'Maretron: Slave Response')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 137
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Maretron", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # product_code | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    product_code_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    product_code = product_code_raw * 1 if product_code_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('product_code', 'Product code', "0x1b2=SSC200", '', product_code, product_code_raw))

    # software_code | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    software_code_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    software_code = software_code_raw * 1 if software_code_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('software_code', 'Software code', "", '', software_code, software_code_raw))

    # command | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    command_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    command = command_raw * 1 if command_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('command', 'Command', "0x50=Deviation calibration result", '', command, command_raw))

    # status | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    status_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    status = status_raw * 1 if status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('status', 'Status', "", '', status, status_raw))

    return nmea2000Message

def encode_pgn_126720_maretronSlaveResponse(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # product_code | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'product_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Product code'")
    data_raw |= (field_value & 0xFFFF) << 16
    # software_code | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'software_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Software code'")
    data_raw |= (field_value & 0xFFFF) << 32
    # command | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'command'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Command'")
    data_raw |= (field_value & 0xFF) << 48
    # status | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Status'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw

def decode_pgn_126720_garminDayMode(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'garminDayMode', 'Garmin: Day Mode')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 229
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Garmin", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # unknown_id_1 | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 222
    unknown_id_1_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    unknown_id_1 = unknown_id_1_raw * 1 if unknown_id_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_id_1', 'Unknown ID 1', "Always 222", '', unknown_id_1, unknown_id_1_raw))

    # unknown_id_2 | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 5
    unknown_id_2_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    unknown_id_2 = unknown_id_2_raw * 1 if unknown_id_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_id_2', 'Unknown ID 2', "Always 5", '', unknown_id_2, unknown_id_2_raw))

    # unknown_id_3 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 5
    unknown_id_3_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    unknown_id_3 = unknown_id_3_raw * 1 if unknown_id_3_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_id_3', 'Unknown ID 3', "Always 5", '', unknown_id_3, unknown_id_3_raw))

    # unknown_id_4 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 5
    unknown_id_4_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    unknown_id_4 = unknown_id_4_raw * 1 if unknown_id_4_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_id_4', 'Unknown ID 4', "Always 5", '', unknown_id_4, unknown_id_4_raw))

    # spare | Offset: 48, Length: 16, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 48) & 0xFFFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # mode | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 0
    mode_raw = (data_raw >> 64) & 0xFF
    mode = lookup_GARMIN_COLOR_MODE(mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "Day", '', mode, mode_raw))

    # spare | Offset: 72, Length: 8, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 72) & 0xFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # backlight | Offset: 80, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    backlight_raw = (data_raw >> 80) & 0xFF
    backlight = lookup_GARMIN_BACKLIGHT_LEVEL(backlight_raw)
    nmea2000Message.fields.append(NMEA2000Field('backlight', 'Backlight', "", '', backlight, backlight_raw))

    return nmea2000Message

def encode_pgn_126720_garminDayMode(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # unknown_id_1 | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_id_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown ID 1'")
    data_raw |= (field_value & 0xFF) << 16
    # unknown_id_2 | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_id_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown ID 2'")
    data_raw |= (field_value & 0xFF) << 24
    # unknown_id_3 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_id_3'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown ID 3'")
    data_raw |= (field_value & 0xFF) << 32
    # unknown_id_4 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_id_4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown ID 4'")
    data_raw |= (field_value & 0xFF) << 40
    # spare | Offset: 48, Length: 16, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFFFF) << 48
    # mode | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GARMIN_COLOR_MODE(f.value) for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xFF) << 64
    # spare | Offset: 72, Length: 8, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFF) << 72
    # backlight | Offset: 80, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GARMIN_BACKLIGHT_LEVEL(f.value) for f in nmea2000Message.fields if f.id == 'backlight'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Backlight'")
    data_raw |= (field_value & 0xFF) << 80
    return data_raw

def decode_pgn_126720_garminNightMode(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'garminNightMode', 'Garmin: Night Mode')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 229
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Garmin", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # unknown_id_1 | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 222
    unknown_id_1_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    unknown_id_1 = unknown_id_1_raw * 1 if unknown_id_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_id_1', 'Unknown ID 1', "Always 222", '', unknown_id_1, unknown_id_1_raw))

    # unknown_id_2 | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 5
    unknown_id_2_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    unknown_id_2 = unknown_id_2_raw * 1 if unknown_id_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_id_2', 'Unknown ID 2', "Always 5", '', unknown_id_2, unknown_id_2_raw))

    # unknown_id_3 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 5
    unknown_id_3_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    unknown_id_3 = unknown_id_3_raw * 1 if unknown_id_3_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_id_3', 'Unknown ID 3', "Always 5", '', unknown_id_3, unknown_id_3_raw))

    # unknown_id_4 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 5
    unknown_id_4_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    unknown_id_4 = unknown_id_4_raw * 1 if unknown_id_4_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_id_4', 'Unknown ID 4', "Always 5", '', unknown_id_4, unknown_id_4_raw))

    # spare | Offset: 48, Length: 16, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 48) & 0xFFFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # mode | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 1
    mode_raw = (data_raw >> 64) & 0xFF
    mode = lookup_GARMIN_COLOR_MODE(mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "Night", '', mode, mode_raw))

    # spare | Offset: 72, Length: 8, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 72) & 0xFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # backlight | Offset: 80, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    backlight_raw = (data_raw >> 80) & 0xFF
    backlight = lookup_GARMIN_BACKLIGHT_LEVEL(backlight_raw)
    nmea2000Message.fields.append(NMEA2000Field('backlight', 'Backlight', "", '', backlight, backlight_raw))

    return nmea2000Message

def encode_pgn_126720_garminNightMode(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # unknown_id_1 | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_id_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown ID 1'")
    data_raw |= (field_value & 0xFF) << 16
    # unknown_id_2 | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_id_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown ID 2'")
    data_raw |= (field_value & 0xFF) << 24
    # unknown_id_3 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_id_3'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown ID 3'")
    data_raw |= (field_value & 0xFF) << 32
    # unknown_id_4 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_id_4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown ID 4'")
    data_raw |= (field_value & 0xFF) << 40
    # spare | Offset: 48, Length: 16, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFFFF) << 48
    # mode | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GARMIN_COLOR_MODE(f.value) for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xFF) << 64
    # spare | Offset: 72, Length: 8, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFF) << 72
    # backlight | Offset: 80, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GARMIN_BACKLIGHT_LEVEL(f.value) for f in nmea2000Message.fields if f.id == 'backlight'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Backlight'")
    data_raw |= (field_value & 0xFF) << 80
    return data_raw

def decode_pgn_126720_garminColorMode(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126720."""
    nmea2000Message = NMEA2000Message(126720, 'garminColorMode', 'Garmin: Color mode')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 229
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Garmin", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # unknown_id_1 | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 222
    unknown_id_1_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    unknown_id_1 = unknown_id_1_raw * 1 if unknown_id_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_id_1', 'Unknown ID 1', "Always 222", '', unknown_id_1, unknown_id_1_raw))

    # unknown_id_2 | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 5
    unknown_id_2_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    unknown_id_2 = unknown_id_2_raw * 1 if unknown_id_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_id_2', 'Unknown ID 2', "Always 5", '', unknown_id_2, unknown_id_2_raw))

    # unknown_id_3 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 5
    unknown_id_3_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    unknown_id_3 = unknown_id_3_raw * 1 if unknown_id_3_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_id_3', 'Unknown ID 3', "Always 5", '', unknown_id_3, unknown_id_3_raw))

    # unknown_id_4 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 5
    unknown_id_4_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    unknown_id_4 = unknown_id_4_raw * 1 if unknown_id_4_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unknown_id_4', 'Unknown ID 4', "Always 5", '', unknown_id_4, unknown_id_4_raw))

    # spare | Offset: 48, Length: 16, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 48) & 0xFFFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # mode | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 13
    mode_raw = (data_raw >> 64) & 0xFF
    mode = lookup_GARMIN_COLOR_MODE(mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "Color", '', mode, mode_raw))

    # spare | Offset: 72, Length: 8, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 72) & 0xFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # color | Offset: 80, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    color_raw = (data_raw >> 80) & 0xFF
    color = lookup_GARMIN_COLOR(color_raw)
    nmea2000Message.fields.append(NMEA2000Field('color', 'Color', "", '', color, color_raw))

    return nmea2000Message

def encode_pgn_126720_garminColorMode(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126720."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # unknown_id_1 | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_id_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown ID 1'")
    data_raw |= (field_value & 0xFF) << 16
    # unknown_id_2 | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_id_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown ID 2'")
    data_raw |= (field_value & 0xFF) << 24
    # unknown_id_3 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_id_3'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown ID 3'")
    data_raw |= (field_value & 0xFF) << 32
    # unknown_id_4 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unknown_id_4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unknown ID 4'")
    data_raw |= (field_value & 0xFF) << 40
    # spare | Offset: 48, Length: 16, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFFFF) << 48
    # mode | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GARMIN_COLOR_MODE(f.value) for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xFF) << 64
    # spare | Offset: 72, Length: 8, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFF) << 72
    # color | Offset: 80, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GARMIN_COLOR(f.value) for f in nmea2000Message.fields if f.id == 'color'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Color'")
    data_raw |= (field_value & 0xFF) << 80
    return data_raw


def is_fast_pgn_126983() -> bool:
    """Return True if PGN 126983 is a fast PGN."""
    return True
def decode_pgn_126983(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126983."""
    nmea2000Message = NMEA2000Message(126983, 'alert', 'Alert')
    # alert_type | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    alert_type_raw = (data_raw >> 0) & 0xF
    alert_type = lookup_ALERT_TYPE(alert_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('alert_type', 'Alert Type', "", '', alert_type, alert_type_raw))

    # alert_category | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    alert_category_raw = (data_raw >> 4) & 0xF
    alert_category = lookup_ALERT_CATEGORY(alert_category_raw)
    nmea2000Message.fields.append(NMEA2000Field('alert_category', 'Alert Category', "", '', alert_category, alert_category_raw))

    # alert_system | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_system_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    alert_system = alert_system_raw * 1 if alert_system_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_system', 'Alert System', "", '', alert_system, alert_system_raw))

    # alert_sub_system | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_sub_system_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    alert_sub_system = alert_sub_system_raw * 1 if alert_sub_system_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_sub_system', 'Alert Sub-System', "", '', alert_sub_system, alert_sub_system_raw))

    # alert_id | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    alert_id_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    alert_id = alert_id_raw * 1 if alert_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_id', 'Alert ID', "", '', alert_id, alert_id_raw))

    # data_source_network_id_name | Offset: 40, Length: 64, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_network_id_name_raw = decode_number((data_raw >> 40) & 0xFFFFFFFFFFFFFFFF, 64)
    data_source_network_id_name = data_source_network_id_name_raw * 1 if data_source_network_id_name_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_network_id_name', 'Data Source Network ID NAME', "", '', data_source_network_id_name, data_source_network_id_name_raw))

    # data_source_instance | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_instance_raw = decode_number((data_raw >> 104) & 0xFF, 8)
    data_source_instance = data_source_instance_raw * 1 if data_source_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_instance', 'Data Source Instance', "", '', data_source_instance, data_source_instance_raw))

    # data_source_index_source | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_index_source_raw = decode_number((data_raw >> 112) & 0xFF, 8)
    data_source_index_source = data_source_index_source_raw * 1 if data_source_index_source_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_index_source', 'Data Source Index-Source', "", '', data_source_index_source, data_source_index_source_raw))

    # alert_occurrence_number | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_occurrence_number_raw = decode_number((data_raw >> 120) & 0xFF, 8)
    alert_occurrence_number = alert_occurrence_number_raw * 1 if alert_occurrence_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_occurrence_number', 'Alert Occurrence Number', "", '', alert_occurrence_number, alert_occurrence_number_raw))

    # temporary_silence_status | Offset: 128, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    temporary_silence_status_raw = (data_raw >> 128) & 0x1
    temporary_silence_status = lookup_YES_NO(temporary_silence_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('temporary_silence_status', 'Temporary Silence Status', "", '', temporary_silence_status, temporary_silence_status_raw))

    # acknowledge_status | Offset: 129, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    acknowledge_status_raw = (data_raw >> 129) & 0x1
    acknowledge_status = lookup_YES_NO(acknowledge_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('acknowledge_status', 'Acknowledge Status', "", '', acknowledge_status, acknowledge_status_raw))

    # escalation_status | Offset: 130, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    escalation_status_raw = (data_raw >> 130) & 0x1
    escalation_status = lookup_YES_NO(escalation_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('escalation_status', 'Escalation Status', "", '', escalation_status, escalation_status_raw))

    # temporary_silence_support | Offset: 131, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    temporary_silence_support_raw = (data_raw >> 131) & 0x1
    temporary_silence_support = lookup_YES_NO(temporary_silence_support_raw)
    nmea2000Message.fields.append(NMEA2000Field('temporary_silence_support', 'Temporary Silence Support', "", '', temporary_silence_support, temporary_silence_support_raw))

    # acknowledge_support | Offset: 132, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    acknowledge_support_raw = (data_raw >> 132) & 0x1
    acknowledge_support = lookup_YES_NO(acknowledge_support_raw)
    nmea2000Message.fields.append(NMEA2000Field('acknowledge_support', 'Acknowledge Support', "", '', acknowledge_support, acknowledge_support_raw))

    # escalation_support | Offset: 133, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    escalation_support_raw = (data_raw >> 133) & 0x1
    escalation_support = lookup_YES_NO(escalation_support_raw)
    nmea2000Message.fields.append(NMEA2000Field('escalation_support', 'Escalation Support', "", '', escalation_support, escalation_support_raw))

    # reserved_134 | Offset: 134, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_134_raw = (data_raw >> 134) & 0x3
    reserved_134 = reserved_134_raw * 1 if reserved_134_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_134', 'Reserved', "", '', reserved_134, reserved_134_raw))

    # acknowledge_source_network_id_name | Offset: 136, Length: 64, Resolution: 1, Field Type: NUMBER, Match: 
    acknowledge_source_network_id_name_raw = decode_number((data_raw >> 136) & 0xFFFFFFFFFFFFFFFF, 64)
    acknowledge_source_network_id_name = acknowledge_source_network_id_name_raw * 1 if acknowledge_source_network_id_name_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('acknowledge_source_network_id_name', 'Acknowledge Source Network ID NAME', "", '', acknowledge_source_network_id_name, acknowledge_source_network_id_name_raw))

    # trigger_condition | Offset: 200, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    trigger_condition_raw = (data_raw >> 200) & 0xF
    trigger_condition = lookup_ALERT_TRIGGER_CONDITION(trigger_condition_raw)
    nmea2000Message.fields.append(NMEA2000Field('trigger_condition', 'Trigger Condition', "", '', trigger_condition, trigger_condition_raw))

    # threshold_status | Offset: 204, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    threshold_status_raw = (data_raw >> 204) & 0xF
    threshold_status = lookup_ALERT_THRESHOLD_STATUS(threshold_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('threshold_status', 'Threshold Status', "", '', threshold_status, threshold_status_raw))

    # alert_priority | Offset: 208, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_priority_raw = decode_number((data_raw >> 208) & 0xFF, 8)
    alert_priority = alert_priority_raw * 1 if alert_priority_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_priority', 'Alert Priority', "", '', alert_priority, alert_priority_raw))

    # alert_state | Offset: 216, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    alert_state_raw = (data_raw >> 216) & 0xFF
    alert_state = lookup_ALERT_STATE(alert_state_raw)
    nmea2000Message.fields.append(NMEA2000Field('alert_state', 'Alert State', "", '', alert_state, alert_state_raw))

    return nmea2000Message

def encode_pgn_126983(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126983."""
    data_raw = 0
    # alert_type | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'alert_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Type'")
    data_raw |= (field_value & 0xF) << 0
    # alert_category | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_CATEGORY(f.value) for f in nmea2000Message.fields if f.id == 'alert_category'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Category'")
    data_raw |= (field_value & 0xF) << 4
    # alert_system | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_system'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert System'")
    data_raw |= (field_value & 0xFF) << 8
    # alert_sub_system | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_sub_system'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Sub-System'")
    data_raw |= (field_value & 0xFF) << 16
    # alert_id | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert ID'")
    data_raw |= (field_value & 0xFFFF) << 24
    # data_source_network_id_name | Offset: 40, Length: 64, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_network_id_name'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Network ID NAME'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFF) << 40
    # data_source_instance | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Instance'")
    data_raw |= (field_value & 0xFF) << 104
    # data_source_index_source | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_index_source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Index-Source'")
    data_raw |= (field_value & 0xFF) << 112
    # alert_occurrence_number | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_occurrence_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Occurrence Number'")
    data_raw |= (field_value & 0xFF) << 120
    # temporary_silence_status | Offset: 128, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'temporary_silence_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temporary Silence Status'")
    data_raw |= (field_value & 0x1) << 128
    # acknowledge_status | Offset: 129, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'acknowledge_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Acknowledge Status'")
    data_raw |= (field_value & 0x1) << 129
    # escalation_status | Offset: 130, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'escalation_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Escalation Status'")
    data_raw |= (field_value & 0x1) << 130
    # temporary_silence_support | Offset: 131, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'temporary_silence_support'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temporary Silence Support'")
    data_raw |= (field_value & 0x1) << 131
    # acknowledge_support | Offset: 132, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'acknowledge_support'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Acknowledge Support'")
    data_raw |= (field_value & 0x1) << 132
    # escalation_support | Offset: 133, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'escalation_support'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Escalation Support'")
    data_raw |= (field_value & 0x1) << 133
    # reserved_134 | Offset: 134, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_134'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 134
    # acknowledge_source_network_id_name | Offset: 136, Length: 64, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'acknowledge_source_network_id_name'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Acknowledge Source Network ID NAME'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFF) << 136
    # trigger_condition | Offset: 200, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_TRIGGER_CONDITION(f.value) for f in nmea2000Message.fields if f.id == 'trigger_condition'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Trigger Condition'")
    data_raw |= (field_value & 0xF) << 200
    # threshold_status | Offset: 204, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_THRESHOLD_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'threshold_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Threshold Status'")
    data_raw |= (field_value & 0xF) << 204
    # alert_priority | Offset: 208, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_priority'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Priority'")
    data_raw |= (field_value & 0xFF) << 208
    # alert_state | Offset: 216, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_STATE(f.value) for f in nmea2000Message.fields if f.id == 'alert_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert State'")
    data_raw |= (field_value & 0xFF) << 216
    return data_raw


def is_fast_pgn_126984() -> bool:
    """Return True if PGN 126984 is a fast PGN."""
    return True
def decode_pgn_126984(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126984."""
    nmea2000Message = NMEA2000Message(126984, 'alertResponse', 'Alert Response')
    # alert_type | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    alert_type_raw = (data_raw >> 0) & 0xF
    alert_type = lookup_ALERT_TYPE(alert_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('alert_type', 'Alert Type', "", '', alert_type, alert_type_raw))

    # alert_category | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    alert_category_raw = (data_raw >> 4) & 0xF
    alert_category = lookup_ALERT_CATEGORY(alert_category_raw)
    nmea2000Message.fields.append(NMEA2000Field('alert_category', 'Alert Category', "", '', alert_category, alert_category_raw))

    # alert_system | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_system_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    alert_system = alert_system_raw * 1 if alert_system_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_system', 'Alert System', "", '', alert_system, alert_system_raw))

    # alert_sub_system | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_sub_system_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    alert_sub_system = alert_sub_system_raw * 1 if alert_sub_system_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_sub_system', 'Alert Sub-System', "", '', alert_sub_system, alert_sub_system_raw))

    # alert_id | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    alert_id_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    alert_id = alert_id_raw * 1 if alert_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_id', 'Alert ID', "", '', alert_id, alert_id_raw))

    # data_source_network_id_name | Offset: 40, Length: 64, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_network_id_name_raw = decode_number((data_raw >> 40) & 0xFFFFFFFFFFFFFFFF, 64)
    data_source_network_id_name = data_source_network_id_name_raw * 1 if data_source_network_id_name_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_network_id_name', 'Data Source Network ID NAME', "", '', data_source_network_id_name, data_source_network_id_name_raw))

    # data_source_instance | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_instance_raw = decode_number((data_raw >> 104) & 0xFF, 8)
    data_source_instance = data_source_instance_raw * 1 if data_source_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_instance', 'Data Source Instance', "", '', data_source_instance, data_source_instance_raw))

    # data_source_index_source | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_index_source_raw = decode_number((data_raw >> 112) & 0xFF, 8)
    data_source_index_source = data_source_index_source_raw * 1 if data_source_index_source_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_index_source', 'Data Source Index-Source', "", '', data_source_index_source, data_source_index_source_raw))

    # alert_occurrence_number | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_occurrence_number_raw = decode_number((data_raw >> 120) & 0xFF, 8)
    alert_occurrence_number = alert_occurrence_number_raw * 1 if alert_occurrence_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_occurrence_number', 'Alert Occurrence Number', "", '', alert_occurrence_number, alert_occurrence_number_raw))

    # acknowledge_source_network_id_name | Offset: 128, Length: 64, Resolution: 1, Field Type: NUMBER, Match: 
    acknowledge_source_network_id_name_raw = decode_number((data_raw >> 128) & 0xFFFFFFFFFFFFFFFF, 64)
    acknowledge_source_network_id_name = acknowledge_source_network_id_name_raw * 1 if acknowledge_source_network_id_name_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('acknowledge_source_network_id_name', 'Acknowledge Source Network ID NAME', "", '', acknowledge_source_network_id_name, acknowledge_source_network_id_name_raw))

    # response_command | Offset: 192, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    response_command_raw = (data_raw >> 192) & 0x3
    response_command = lookup_ALERT_RESPONSE_COMMAND(response_command_raw)
    nmea2000Message.fields.append(NMEA2000Field('response_command', 'Response Command', "", '', response_command, response_command_raw))

    # reserved_194 | Offset: 194, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_194_raw = (data_raw >> 194) & 0x3F
    reserved_194 = reserved_194_raw * 1 if reserved_194_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_194', 'Reserved', "", '', reserved_194, reserved_194_raw))

    return nmea2000Message

def encode_pgn_126984(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126984."""
    data_raw = 0
    # alert_type | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'alert_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Type'")
    data_raw |= (field_value & 0xF) << 0
    # alert_category | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_CATEGORY(f.value) for f in nmea2000Message.fields if f.id == 'alert_category'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Category'")
    data_raw |= (field_value & 0xF) << 4
    # alert_system | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_system'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert System'")
    data_raw |= (field_value & 0xFF) << 8
    # alert_sub_system | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_sub_system'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Sub-System'")
    data_raw |= (field_value & 0xFF) << 16
    # alert_id | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert ID'")
    data_raw |= (field_value & 0xFFFF) << 24
    # data_source_network_id_name | Offset: 40, Length: 64, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_network_id_name'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Network ID NAME'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFF) << 40
    # data_source_instance | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Instance'")
    data_raw |= (field_value & 0xFF) << 104
    # data_source_index_source | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_index_source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Index-Source'")
    data_raw |= (field_value & 0xFF) << 112
    # alert_occurrence_number | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_occurrence_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Occurrence Number'")
    data_raw |= (field_value & 0xFF) << 120
    # acknowledge_source_network_id_name | Offset: 128, Length: 64, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'acknowledge_source_network_id_name'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Acknowledge Source Network ID NAME'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFF) << 128
    # response_command | Offset: 192, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_RESPONSE_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'response_command'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Response Command'")
    data_raw |= (field_value & 0x3) << 192
    # reserved_194 | Offset: 194, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_194'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 194
    return data_raw


def is_fast_pgn_126985() -> bool:
    """Return True if PGN 126985 is a fast PGN."""
    return True
def decode_pgn_126985(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126985."""
    nmea2000Message = NMEA2000Message(126985, 'alertText', 'Alert Text')
    # alert_type | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    alert_type_raw = (data_raw >> 0) & 0xF
    alert_type = lookup_ALERT_TYPE(alert_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('alert_type', 'Alert Type', "", '', alert_type, alert_type_raw))

    # alert_category | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    alert_category_raw = (data_raw >> 4) & 0xF
    alert_category = lookup_ALERT_CATEGORY(alert_category_raw)
    nmea2000Message.fields.append(NMEA2000Field('alert_category', 'Alert Category', "", '', alert_category, alert_category_raw))

    # alert_system | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_system_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    alert_system = alert_system_raw * 1 if alert_system_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_system', 'Alert System', "", '', alert_system, alert_system_raw))

    # alert_sub_system | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_sub_system_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    alert_sub_system = alert_sub_system_raw * 1 if alert_sub_system_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_sub_system', 'Alert Sub-System', "", '', alert_sub_system, alert_sub_system_raw))

    # alert_id | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    alert_id_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    alert_id = alert_id_raw * 1 if alert_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_id', 'Alert ID', "", '', alert_id, alert_id_raw))

    # data_source_network_id_name | Offset: 40, Length: 64, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_network_id_name_raw = decode_number((data_raw >> 40) & 0xFFFFFFFFFFFFFFFF, 64)
    data_source_network_id_name = data_source_network_id_name_raw * 1 if data_source_network_id_name_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_network_id_name', 'Data Source Network ID NAME', "", '', data_source_network_id_name, data_source_network_id_name_raw))

    # data_source_instance | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_instance_raw = decode_number((data_raw >> 104) & 0xFF, 8)
    data_source_instance = data_source_instance_raw * 1 if data_source_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_instance', 'Data Source Instance', "", '', data_source_instance, data_source_instance_raw))

    # data_source_index_source | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_index_source_raw = decode_number((data_raw >> 112) & 0xFF, 8)
    data_source_index_source = data_source_index_source_raw * 1 if data_source_index_source_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_index_source', 'Data Source Index-Source', "", '', data_source_index_source, data_source_index_source_raw))

    # alert_occurrence_number | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_occurrence_number_raw = decode_number((data_raw >> 120) & 0xFF, 8)
    alert_occurrence_number = alert_occurrence_number_raw * 1 if alert_occurrence_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_occurrence_number', 'Alert Occurrence Number', "", '', alert_occurrence_number, alert_occurrence_number_raw))

    # language_id | Offset: 128, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    language_id_raw = (data_raw >> 128) & 0xFF
    language_id = lookup_ALERT_LANGUAGE_ID(language_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('language_id', 'Language ID', "", '', language_id, language_id_raw))



    return nmea2000Message

def encode_pgn_126985(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126985."""
    data_raw = 0
    # alert_type | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'alert_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Type'")
    data_raw |= (field_value & 0xF) << 0
    # alert_category | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_CATEGORY(f.value) for f in nmea2000Message.fields if f.id == 'alert_category'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Category'")
    data_raw |= (field_value & 0xF) << 4
    # alert_system | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_system'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert System'")
    data_raw |= (field_value & 0xFF) << 8
    # alert_sub_system | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_sub_system'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Sub-System'")
    data_raw |= (field_value & 0xFF) << 16
    # alert_id | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert ID'")
    data_raw |= (field_value & 0xFFFF) << 24
    # data_source_network_id_name | Offset: 40, Length: 64, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_network_id_name'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Network ID NAME'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFF) << 40
    # data_source_instance | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Instance'")
    data_raw |= (field_value & 0xFF) << 104
    # data_source_index_source | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_index_source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Index-Source'")
    data_raw |= (field_value & 0xFF) << 112
    # alert_occurrence_number | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_occurrence_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Occurrence Number'")
    data_raw |= (field_value & 0xFF) << 120
    # language_id | Offset: 128, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_LANGUAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'language_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Language ID'")
    data_raw |= (field_value & 0xFF) << 128
    raise Exception ("PGN 126985 not supporting encoding for now as Alert Text Description is missing BitLength or BitOffset")
    raise Exception ("PGN 126985 not supporting encoding for now as Alert Location Text Description is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_126986() -> bool:
    """Return True if PGN 126986 is a fast PGN."""
    return True
def decode_pgn_126986(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126986."""
    nmea2000Message = NMEA2000Message(126986, 'alertConfiguration', 'Alert Configuration')
    # alert_type | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    alert_type_raw = (data_raw >> 0) & 0xF
    alert_type = lookup_ALERT_TYPE(alert_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('alert_type', 'Alert Type', "", '', alert_type, alert_type_raw))

    # alert_category | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    alert_category_raw = (data_raw >> 4) & 0xF
    alert_category = lookup_ALERT_CATEGORY(alert_category_raw)
    nmea2000Message.fields.append(NMEA2000Field('alert_category', 'Alert Category', "", '', alert_category, alert_category_raw))

    # alert_system | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_system_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    alert_system = alert_system_raw * 1 if alert_system_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_system', 'Alert System', "", '', alert_system, alert_system_raw))

    # alert_sub_system | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_sub_system_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    alert_sub_system = alert_sub_system_raw * 1 if alert_sub_system_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_sub_system', 'Alert Sub-System', "", '', alert_sub_system, alert_sub_system_raw))

    # alert_id | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    alert_id_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    alert_id = alert_id_raw * 1 if alert_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_id', 'Alert ID', "", '', alert_id, alert_id_raw))

    # data_source_network_id_name | Offset: 40, Length: 64, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_network_id_name_raw = decode_number((data_raw >> 40) & 0xFFFFFFFFFFFFFFFF, 64)
    data_source_network_id_name = data_source_network_id_name_raw * 1 if data_source_network_id_name_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_network_id_name', 'Data Source Network ID NAME', "", '', data_source_network_id_name, data_source_network_id_name_raw))

    # data_source_instance | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_instance_raw = decode_number((data_raw >> 104) & 0xFF, 8)
    data_source_instance = data_source_instance_raw * 1 if data_source_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_instance', 'Data Source Instance', "", '', data_source_instance, data_source_instance_raw))

    # data_source_index_source | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_index_source_raw = decode_number((data_raw >> 112) & 0xFF, 8)
    data_source_index_source = data_source_index_source_raw * 1 if data_source_index_source_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_index_source', 'Data Source Index-Source', "", '', data_source_index_source, data_source_index_source_raw))

    # alert_occurrence_number | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_occurrence_number_raw = decode_number((data_raw >> 120) & 0xFF, 8)
    alert_occurrence_number = alert_occurrence_number_raw * 1 if alert_occurrence_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_occurrence_number', 'Alert Occurrence Number', "", '', alert_occurrence_number, alert_occurrence_number_raw))

    # alert_control | Offset: 128, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    alert_control_raw = decode_number((data_raw >> 128) & 0x3, 2)
    alert_control = alert_control_raw * 1 if alert_control_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_control', 'Alert Control', "", '', alert_control, alert_control_raw))

    # user_defined_alert_assignment | Offset: 130, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    user_defined_alert_assignment_raw = decode_number((data_raw >> 130) & 0x3, 2)
    user_defined_alert_assignment = user_defined_alert_assignment_raw * 1 if user_defined_alert_assignment_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('user_defined_alert_assignment', 'User Defined Alert Assignment', "", '', user_defined_alert_assignment, user_defined_alert_assignment_raw))

    # reserved_132 | Offset: 132, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_132_raw = (data_raw >> 132) & 0xF
    reserved_132 = reserved_132_raw * 1 if reserved_132_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_132', 'Reserved', "", '', reserved_132, reserved_132_raw))

    # reactivation_period | Offset: 136, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    reactivation_period_raw = decode_number((data_raw >> 136) & 0xFF, 8)
    reactivation_period = reactivation_period_raw * 1 if reactivation_period_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reactivation_period', 'Reactivation Period', "", '', reactivation_period, reactivation_period_raw))

    # temporary_silence_period | Offset: 144, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    temporary_silence_period_raw = decode_number((data_raw >> 144) & 0xFF, 8)
    temporary_silence_period = temporary_silence_period_raw * 1 if temporary_silence_period_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('temporary_silence_period', 'Temporary Silence Period', "", '', temporary_silence_period, temporary_silence_period_raw))

    # escalation_period | Offset: 152, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    escalation_period_raw = decode_number((data_raw >> 152) & 0xFF, 8)
    escalation_period = escalation_period_raw * 1 if escalation_period_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('escalation_period', 'Escalation Period', "", '', escalation_period, escalation_period_raw))

    return nmea2000Message

def encode_pgn_126986(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126986."""
    data_raw = 0
    # alert_type | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'alert_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Type'")
    data_raw |= (field_value & 0xF) << 0
    # alert_category | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_CATEGORY(f.value) for f in nmea2000Message.fields if f.id == 'alert_category'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Category'")
    data_raw |= (field_value & 0xF) << 4
    # alert_system | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_system'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert System'")
    data_raw |= (field_value & 0xFF) << 8
    # alert_sub_system | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_sub_system'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Sub-System'")
    data_raw |= (field_value & 0xFF) << 16
    # alert_id | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert ID'")
    data_raw |= (field_value & 0xFFFF) << 24
    # data_source_network_id_name | Offset: 40, Length: 64, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_network_id_name'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Network ID NAME'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFF) << 40
    # data_source_instance | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Instance'")
    data_raw |= (field_value & 0xFF) << 104
    # data_source_index_source | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_index_source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Index-Source'")
    data_raw |= (field_value & 0xFF) << 112
    # alert_occurrence_number | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_occurrence_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Occurrence Number'")
    data_raw |= (field_value & 0xFF) << 120
    # alert_control | Offset: 128, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Control'")
    data_raw |= (field_value & 0x3) << 128
    # user_defined_alert_assignment | Offset: 130, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'user_defined_alert_assignment'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'User Defined Alert Assignment'")
    data_raw |= (field_value & 0x3) << 130
    # reserved_132 | Offset: 132, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_132'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 132
    # reactivation_period | Offset: 136, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reactivation_period'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reactivation Period'")
    data_raw |= (field_value & 0xFF) << 136
    # temporary_silence_period | Offset: 144, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'temporary_silence_period'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temporary Silence Period'")
    data_raw |= (field_value & 0xFF) << 144
    # escalation_period | Offset: 152, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'escalation_period'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Escalation Period'")
    data_raw |= (field_value & 0xFF) << 152
    return data_raw


def is_fast_pgn_126987() -> bool:
    """Return True if PGN 126987 is a fast PGN."""
    return True
def decode_pgn_126987(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126987."""
    nmea2000Message = NMEA2000Message(126987, 'alertThreshold', 'Alert Threshold')
    # alert_type | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    alert_type_raw = (data_raw >> 0) & 0xF
    alert_type = lookup_ALERT_TYPE(alert_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('alert_type', 'Alert Type', "", '', alert_type, alert_type_raw))

    # alert_category | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    alert_category_raw = (data_raw >> 4) & 0xF
    alert_category = lookup_ALERT_CATEGORY(alert_category_raw)
    nmea2000Message.fields.append(NMEA2000Field('alert_category', 'Alert Category', "", '', alert_category, alert_category_raw))

    # alert_system | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_system_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    alert_system = alert_system_raw * 1 if alert_system_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_system', 'Alert System', "", '', alert_system, alert_system_raw))

    # alert_sub_system | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_sub_system_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    alert_sub_system = alert_sub_system_raw * 1 if alert_sub_system_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_sub_system', 'Alert Sub-System', "", '', alert_sub_system, alert_sub_system_raw))

    # alert_id | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    alert_id_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    alert_id = alert_id_raw * 1 if alert_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_id', 'Alert ID', "", '', alert_id, alert_id_raw))

    # data_source_network_id_name | Offset: 40, Length: 64, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_network_id_name_raw = decode_number((data_raw >> 40) & 0xFFFFFFFFFFFFFFFF, 64)
    data_source_network_id_name = data_source_network_id_name_raw * 1 if data_source_network_id_name_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_network_id_name', 'Data Source Network ID NAME', "", '', data_source_network_id_name, data_source_network_id_name_raw))

    # data_source_instance | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_instance_raw = decode_number((data_raw >> 104) & 0xFF, 8)
    data_source_instance = data_source_instance_raw * 1 if data_source_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_instance', 'Data Source Instance', "", '', data_source_instance, data_source_instance_raw))

    # data_source_index_source | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_index_source_raw = decode_number((data_raw >> 112) & 0xFF, 8)
    data_source_index_source = data_source_index_source_raw * 1 if data_source_index_source_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_index_source', 'Data Source Index-Source', "", '', data_source_index_source, data_source_index_source_raw))

    # alert_occurrence_number | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_occurrence_number_raw = decode_number((data_raw >> 120) & 0xFF, 8)
    alert_occurrence_number = alert_occurrence_number_raw * 1 if alert_occurrence_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_occurrence_number', 'Alert Occurrence Number', "", '', alert_occurrence_number, alert_occurrence_number_raw))

    # number_of_parameters | Offset: 128, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_parameters_raw = decode_number((data_raw >> 128) & 0xFF, 8)
    number_of_parameters = number_of_parameters_raw * 1 if number_of_parameters_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_parameters', 'Number of Parameters', "Total Number of Threshold Parameters", '', number_of_parameters, number_of_parameters_raw))

    # parameter_number | Offset: 136, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    parameter_number_raw = decode_number((data_raw >> 136) & 0xFF, 8)
    parameter_number = parameter_number_raw * 1 if parameter_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('parameter_number', 'Parameter Number', "", '', parameter_number, parameter_number_raw))

    # trigger_method | Offset: 144, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    trigger_method_raw = decode_number((data_raw >> 144) & 0xFF, 8)
    trigger_method = trigger_method_raw * 1 if trigger_method_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('trigger_method', 'Trigger Method', "", '', trigger_method, trigger_method_raw))

    # threshold_data_format | Offset: 152, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    threshold_data_format_raw = decode_number((data_raw >> 152) & 0xFF, 8)
    threshold_data_format = threshold_data_format_raw * 1 if threshold_data_format_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('threshold_data_format', 'Threshold Data Format', "", '', threshold_data_format, threshold_data_format_raw))

    # threshold_level | Offset: 160, Length: 64, Resolution: 1, Field Type: NUMBER, Match: 
    threshold_level_raw = decode_number((data_raw >> 160) & 0xFFFFFFFFFFFFFFFF, 64)
    threshold_level = threshold_level_raw * 1 if threshold_level_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('threshold_level', 'Threshold Level', "", '', threshold_level, threshold_level_raw))

    return nmea2000Message

def encode_pgn_126987(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126987."""
    data_raw = 0
    # alert_type | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'alert_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Type'")
    data_raw |= (field_value & 0xF) << 0
    # alert_category | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_CATEGORY(f.value) for f in nmea2000Message.fields if f.id == 'alert_category'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Category'")
    data_raw |= (field_value & 0xF) << 4
    # alert_system | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_system'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert System'")
    data_raw |= (field_value & 0xFF) << 8
    # alert_sub_system | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_sub_system'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Sub-System'")
    data_raw |= (field_value & 0xFF) << 16
    # alert_id | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert ID'")
    data_raw |= (field_value & 0xFFFF) << 24
    # data_source_network_id_name | Offset: 40, Length: 64, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_network_id_name'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Network ID NAME'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFF) << 40
    # data_source_instance | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Instance'")
    data_raw |= (field_value & 0xFF) << 104
    # data_source_index_source | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_index_source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Index-Source'")
    data_raw |= (field_value & 0xFF) << 112
    # alert_occurrence_number | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_occurrence_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Occurrence Number'")
    data_raw |= (field_value & 0xFF) << 120
    # number_of_parameters | Offset: 128, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_parameters'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Parameters'")
    data_raw |= (field_value & 0xFF) << 128
    # parameter_number | Offset: 136, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'parameter_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Parameter Number'")
    data_raw |= (field_value & 0xFF) << 136
    # trigger_method | Offset: 144, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'trigger_method'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Trigger Method'")
    data_raw |= (field_value & 0xFF) << 144
    # threshold_data_format | Offset: 152, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'threshold_data_format'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Threshold Data Format'")
    data_raw |= (field_value & 0xFF) << 152
    # threshold_level | Offset: 160, Length: 64, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'threshold_level'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Threshold Level'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFF) << 160
    return data_raw


def is_fast_pgn_126988() -> bool:
    """Return True if PGN 126988 is a fast PGN."""
    return True
def decode_pgn_126988(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126988."""
    nmea2000Message = NMEA2000Message(126988, 'alertValue', 'Alert Value')
    # alert_type | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    alert_type_raw = (data_raw >> 0) & 0xF
    alert_type = lookup_ALERT_TYPE(alert_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('alert_type', 'Alert Type', "", '', alert_type, alert_type_raw))

    # alert_category | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    alert_category_raw = (data_raw >> 4) & 0xF
    alert_category = lookup_ALERT_CATEGORY(alert_category_raw)
    nmea2000Message.fields.append(NMEA2000Field('alert_category', 'Alert Category', "", '', alert_category, alert_category_raw))

    # alert_system | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_system_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    alert_system = alert_system_raw * 1 if alert_system_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_system', 'Alert System', "", '', alert_system, alert_system_raw))

    # alert_sub_system | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_sub_system_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    alert_sub_system = alert_sub_system_raw * 1 if alert_sub_system_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_sub_system', 'Alert Sub-System', "", '', alert_sub_system, alert_sub_system_raw))

    # alert_id | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    alert_id_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    alert_id = alert_id_raw * 1 if alert_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_id', 'Alert ID', "", '', alert_id, alert_id_raw))

    # data_source_network_id_name | Offset: 40, Length: 64, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_network_id_name_raw = decode_number((data_raw >> 40) & 0xFFFFFFFFFFFFFFFF, 64)
    data_source_network_id_name = data_source_network_id_name_raw * 1 if data_source_network_id_name_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_network_id_name', 'Data Source Network ID NAME', "", '', data_source_network_id_name, data_source_network_id_name_raw))

    # data_source_instance | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_instance_raw = decode_number((data_raw >> 104) & 0xFF, 8)
    data_source_instance = data_source_instance_raw * 1 if data_source_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_instance', 'Data Source Instance', "", '', data_source_instance, data_source_instance_raw))

    # data_source_index_source | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_index_source_raw = decode_number((data_raw >> 112) & 0xFF, 8)
    data_source_index_source = data_source_index_source_raw * 1 if data_source_index_source_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_index_source', 'Data Source Index-Source', "", '', data_source_index_source, data_source_index_source_raw))

    # alert_occurrence_number | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    alert_occurrence_number_raw = decode_number((data_raw >> 120) & 0xFF, 8)
    alert_occurrence_number = alert_occurrence_number_raw * 1 if alert_occurrence_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alert_occurrence_number', 'Alert Occurrence Number', "", '', alert_occurrence_number, alert_occurrence_number_raw))

    # number_of_parameters | Offset: 128, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_parameters_raw = decode_number((data_raw >> 128) & 0xFF, 8)
    number_of_parameters = number_of_parameters_raw * 1 if number_of_parameters_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_parameters', 'Number of Parameters', "Total Number of Value Parameters", '', number_of_parameters, number_of_parameters_raw))

    # value_parameter_number | Offset: 136, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    value_parameter_number_raw = decode_number((data_raw >> 136) & 0xFF, 8)
    value_parameter_number = value_parameter_number_raw * 1 if value_parameter_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('value_parameter_number', 'Value Parameter Number', "", '', value_parameter_number, value_parameter_number_raw))

    # value_data_format | Offset: 144, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    value_data_format_raw = decode_number((data_raw >> 144) & 0xFF, 8)
    value_data_format = value_data_format_raw * 1 if value_data_format_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('value_data_format', 'Value Data Format', "", '', value_data_format, value_data_format_raw))

    # value_data | Offset: 152, Length: 64, Resolution: 1, Field Type: NUMBER, Match: 
    value_data_raw = decode_number((data_raw >> 152) & 0xFFFFFFFFFFFFFFFF, 64)
    value_data = value_data_raw * 1 if value_data_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('value_data', 'Value Data', "", '', value_data, value_data_raw))

    return nmea2000Message

def encode_pgn_126988(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126988."""
    data_raw = 0
    # alert_type | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'alert_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Type'")
    data_raw |= (field_value & 0xF) << 0
    # alert_category | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ALERT_CATEGORY(f.value) for f in nmea2000Message.fields if f.id == 'alert_category'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Category'")
    data_raw |= (field_value & 0xF) << 4
    # alert_system | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_system'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert System'")
    data_raw |= (field_value & 0xFF) << 8
    # alert_sub_system | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_sub_system'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Sub-System'")
    data_raw |= (field_value & 0xFF) << 16
    # alert_id | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert ID'")
    data_raw |= (field_value & 0xFFFF) << 24
    # data_source_network_id_name | Offset: 40, Length: 64, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_network_id_name'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Network ID NAME'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFF) << 40
    # data_source_instance | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Instance'")
    data_raw |= (field_value & 0xFF) << 104
    # data_source_index_source | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_index_source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Index-Source'")
    data_raw |= (field_value & 0xFF) << 112
    # alert_occurrence_number | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alert_occurrence_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alert Occurrence Number'")
    data_raw |= (field_value & 0xFF) << 120
    # number_of_parameters | Offset: 128, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_parameters'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Parameters'")
    data_raw |= (field_value & 0xFF) << 128
    # value_parameter_number | Offset: 136, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'value_parameter_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Value Parameter Number'")
    data_raw |= (field_value & 0xFF) << 136
    # value_data_format | Offset: 144, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'value_data_format'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Value Data Format'")
    data_raw |= (field_value & 0xFF) << 144
    # value_data | Offset: 152, Length: 64, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'value_data'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Value Data'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFF) << 152
    return data_raw


def is_fast_pgn_126992() -> bool:
    """Return True if PGN 126992 is a fast PGN."""
    return False
def decode_pgn_126992(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126992."""
    nmea2000Message = NMEA2000Message(126992, 'systemTime', 'System Time')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # source | Offset: 8, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 8) & 0xF
    source = lookup_SYSTEM_TIME(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_12_raw = (data_raw >> 12) & 0xF
    reserved_12 = reserved_12_raw * 1 if reserved_12_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_12', 'Reserved', "", '', reserved_12, reserved_12_raw))

    # date | Offset: 16, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    date_raw = (data_raw >> 16) & 0xFFFF
    date = decode_date(date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('date', 'Date', "", 'd', date, date_raw))

    # time | Offset: 32, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    time_raw = (data_raw >> 32) & 0xFFFFFFFF
    time = decode_time(time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('time', 'Time', "Seconds since midnight", 's', time, time_raw))

    return nmea2000Message

def encode_pgn_126992(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126992."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # source | Offset: 8, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SYSTEM_TIME(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xF) << 8
    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_12'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 12
    # date | Offset: 16, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Date'")
    data_raw |= (field_value & 0xFFFF) << 16
    # time | Offset: 32, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 32
    
    return data_raw


def is_fast_pgn_126993() -> bool:
    """Return True if PGN 126993 is a fast PGN."""
    return False
def decode_pgn_126993(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126993."""
    nmea2000Message = NMEA2000Message(126993, 'heartbeat', 'Heartbeat')
    # data_transmit_offset | Offset: 0, Length: 16, Resolution: 0.001, Field Type: TIME, Match: 
    data_transmit_offset_raw = (data_raw >> 0) & 0xFFFF
    data_transmit_offset = decode_time(data_transmit_offset_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('data_transmit_offset', 'Data transmit offset', "Offset in transmit time from time of request command: 0x0 = transmit immediately, 0xFFFF = Do not change offset.", 's', data_transmit_offset, data_transmit_offset_raw))

    # sequence_counter | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sequence_counter_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    sequence_counter = sequence_counter_raw * 1 if sequence_counter_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sequence_counter', 'Sequence Counter', "", '', sequence_counter, sequence_counter_raw))

    # controller_1_state | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    controller_1_state_raw = (data_raw >> 24) & 0x3
    controller_1_state = lookup_CONTROLLER_STATE(controller_1_state_raw)
    nmea2000Message.fields.append(NMEA2000Field('controller_1_state', 'Controller 1 State', "", '', controller_1_state, controller_1_state_raw))

    # controller_2_state | Offset: 26, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    controller_2_state_raw = (data_raw >> 26) & 0x3
    controller_2_state = lookup_CONTROLLER_STATE(controller_2_state_raw)
    nmea2000Message.fields.append(NMEA2000Field('controller_2_state', 'Controller 2 State', "", '', controller_2_state, controller_2_state_raw))

    # equipment_status | Offset: 28, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    equipment_status_raw = (data_raw >> 28) & 0x3
    equipment_status = lookup_EQUIPMENT_STATUS(equipment_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('equipment_status', 'Equipment Status', "", '', equipment_status, equipment_status_raw))

    # reserved_30 | Offset: 30, Length: 34, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_30_raw = (data_raw >> 30) & 0x3FFFFFFFF
    reserved_30 = reserved_30_raw * 1 if reserved_30_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_30', 'Reserved', "", '', reserved_30, reserved_30_raw))

    return nmea2000Message

def encode_pgn_126993(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126993."""
    data_raw = 0
    # data_transmit_offset | Offset: 0, Length: 16, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_transmit_offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data transmit offset'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 0
    
    # sequence_counter | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sequence_counter'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sequence Counter'")
    data_raw |= (field_value & 0xFF) << 16
    # controller_1_state | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_CONTROLLER_STATE(f.value) for f in nmea2000Message.fields if f.id == 'controller_1_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Controller 1 State'")
    data_raw |= (field_value & 0x3) << 24
    # controller_2_state | Offset: 26, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_CONTROLLER_STATE(f.value) for f in nmea2000Message.fields if f.id == 'controller_2_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Controller 2 State'")
    data_raw |= (field_value & 0x3) << 26
    # equipment_status | Offset: 28, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_EQUIPMENT_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'equipment_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Equipment Status'")
    data_raw |= (field_value & 0x3) << 28
    # reserved_30 | Offset: 30, Length: 34, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_30'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3FFFFFFFF) << 30
    return data_raw


def is_fast_pgn_126996() -> bool:
    """Return True if PGN 126996 is a fast PGN."""
    return True
def decode_pgn_126996(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126996."""
    nmea2000Message = NMEA2000Message(126996, 'productInformation', 'Product Information')
    # nmea_2000_version | Offset: 0, Length: 16, Resolution: 0.001, Field Type: NUMBER, Match: 
    nmea_2000_version_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    nmea_2000_version = nmea_2000_version_raw * 0.001 if nmea_2000_version_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('nmea_2000_version', 'NMEA 2000 Version', "", '', nmea_2000_version, nmea_2000_version_raw))

    # product_code | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    product_code_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    product_code = product_code_raw * 1 if product_code_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('product_code', 'Product Code', "", '', product_code, product_code_raw))

    # model_id | Offset: 32, Length: 256, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # software_version_code | Offset: 288, Length: 256, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # model_version | Offset: 544, Length: 256, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # model_serial_code | Offset: 800, Length: 256, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # certification_level | Offset: 1056, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    certification_level_raw = decode_number((data_raw >> 1056) & 0xFF, 8)
    certification_level = certification_level_raw * 1 if certification_level_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('certification_level', 'Certification Level', "", '', certification_level, certification_level_raw))

    # load_equivalency | Offset: 1064, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    load_equivalency_raw = decode_number((data_raw >> 1064) & 0xFF, 8)
    load_equivalency = load_equivalency_raw * 1 if load_equivalency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('load_equivalency', 'Load Equivalency', "", '', load_equivalency, load_equivalency_raw))

    return nmea2000Message

def encode_pgn_126996(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126996."""
    data_raw = 0
    # nmea_2000_version | Offset: 0, Length: 16, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'nmea_2000_version'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'NMEA 2000 Version'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 0
    
    # product_code | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'product_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Product Code'")
    data_raw |= (field_value & 0xFFFF) << 16
    # model_id | Offset: 32, Length: 256, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Model ID'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 32
    # software_version_code | Offset: 288, Length: 256, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Software Version Code'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 288
    # model_version | Offset: 544, Length: 256, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Model Version'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 544
    # model_serial_code | Offset: 800, Length: 256, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Model Serial Code'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 800
    # certification_level | Offset: 1056, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'certification_level'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Certification Level'")
    data_raw |= (field_value & 0xFF) << 1056
    # load_equivalency | Offset: 1064, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'load_equivalency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Load Equivalency'")
    data_raw |= (field_value & 0xFF) << 1064
    return data_raw


def is_fast_pgn_126998() -> bool:
    """Return True if PGN 126998 is a fast PGN."""
    return True
def decode_pgn_126998(data_raw: int) -> NMEA2000Message:
    """Decode PGN 126998."""
    nmea2000Message = NMEA2000Message(126998, 'configurationInformation', 'Configuration Information')



    return nmea2000Message

def encode_pgn_126998(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 126998."""
    data_raw = 0
    raise Exception ("PGN 126998 not supporting encoding for now as Installation Description #1 is missing BitLength or BitOffset")
    raise Exception ("PGN 126998 not supporting encoding for now as Installation Description #2 is missing BitLength or BitOffset")
    raise Exception ("PGN 126998 not supporting encoding for now as Manufacturer Information is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_127233() -> bool:
    """Return True if PGN 127233 is a fast PGN."""
    return True
def decode_pgn_127233(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127233."""
    nmea2000Message = NMEA2000Message(127233, 'manOverboardNotification', 'Man Overboard Notification')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # mob_emitter_id | Offset: 8, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    mob_emitter_id_raw = decode_number((data_raw >> 8) & 0xFFFFFFFF, 32)
    mob_emitter_id = mob_emitter_id_raw * 1 if mob_emitter_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('mob_emitter_id', 'MOB Emitter ID', "Identifier for each MOB emitter, unique to the vessel", '', mob_emitter_id, mob_emitter_id_raw))

    # man_overboard_status | Offset: 40, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    man_overboard_status_raw = (data_raw >> 40) & 0x7
    man_overboard_status = lookup_MOB_STATUS(man_overboard_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('man_overboard_status', 'Man Overboard Status', "", '', man_overboard_status, man_overboard_status_raw))

    # reserved_43 | Offset: 43, Length: 5, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_43_raw = (data_raw >> 43) & 0x1F
    reserved_43 = reserved_43_raw * 1 if reserved_43_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_43', 'Reserved', "", '', reserved_43, reserved_43_raw))

    # activation_time | Offset: 48, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    activation_time_raw = (data_raw >> 48) & 0xFFFFFFFF
    activation_time = decode_time(activation_time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('activation_time', 'Activation Time', "Seconds since midnight", 's', activation_time, activation_time_raw))

    # position_source | Offset: 80, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    position_source_raw = (data_raw >> 80) & 0x7
    position_source = lookup_MOB_POSITION_SOURCE(position_source_raw)
    nmea2000Message.fields.append(NMEA2000Field('position_source', 'Position Source', "", '', position_source, position_source_raw))

    # reserved_83 | Offset: 83, Length: 5, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_83_raw = (data_raw >> 83) & 0x1F
    reserved_83 = reserved_83_raw * 1 if reserved_83_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_83', 'Reserved', "", '', reserved_83, reserved_83_raw))

    # position_date | Offset: 88, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    position_date_raw = (data_raw >> 88) & 0xFFFF
    position_date = decode_date(position_date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('position_date', 'Position Date', "", 'd', position_date, position_date_raw))

    # position_time | Offset: 104, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    position_time_raw = (data_raw >> 104) & 0xFFFFFFFF
    position_time = decode_time(position_time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('position_time', 'Position Time', "Seconds since midnight", 's', position_time, position_time_raw))

    # latitude | Offset: 136, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    latitude_raw = decode_number((data_raw >> 136) & 0xFFFFFFFF, 32)
    if latitude_raw is not None and latitude_raw & (1 << (32 - 1)):
        latitude_raw -= (1 << 32)
    latitude = latitude_raw * 1e-07 if latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('latitude', 'Latitude', "", 'deg', latitude, latitude_raw))

    # longitude | Offset: 168, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    longitude_raw = decode_number((data_raw >> 168) & 0xFFFFFFFF, 32)
    if longitude_raw is not None and longitude_raw & (1 << (32 - 1)):
        longitude_raw -= (1 << 32)
    longitude = longitude_raw * 1e-07 if longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitude', 'Longitude', "", 'deg', longitude, longitude_raw))

    # cog_reference | Offset: 200, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    cog_reference_raw = (data_raw >> 200) & 0x3
    cog_reference = lookup_DIRECTION_REFERENCE(cog_reference_raw)
    nmea2000Message.fields.append(NMEA2000Field('cog_reference', 'COG Reference', "", '', cog_reference, cog_reference_raw))

    # reserved_202 | Offset: 202, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_202_raw = (data_raw >> 202) & 0x3F
    reserved_202 = reserved_202_raw * 1 if reserved_202_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_202', 'Reserved', "", '', reserved_202, reserved_202_raw))

    # cog | Offset: 208, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    cog_raw = decode_number((data_raw >> 208) & 0xFFFF, 16)
    cog = cog_raw * 0.0001 if cog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('cog', 'COG', "", 'rad', cog, cog_raw))

    # sog | Offset: 224, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    sog_raw = decode_number((data_raw >> 224) & 0xFFFF, 16)
    sog = sog_raw * 0.01 if sog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sog', 'SOG', "", 'm/s', sog, sog_raw))

    # mmsi_of_vessel_of_origin | Offset: 240, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    mmsi_of_vessel_of_origin_raw = (data_raw >> 240) & 0xFFFFFFFF
    mmsi_of_vessel_of_origin = mmsi_of_vessel_of_origin_raw * 1 if mmsi_of_vessel_of_origin_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('mmsi_of_vessel_of_origin', 'MMSI of vessel of origin', "", '', mmsi_of_vessel_of_origin, mmsi_of_vessel_of_origin_raw))

    # mob_emitter_battery_low_status | Offset: 272, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    mob_emitter_battery_low_status_raw = (data_raw >> 272) & 0x7
    mob_emitter_battery_low_status = lookup_LOW_BATTERY(mob_emitter_battery_low_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('mob_emitter_battery_low_status', 'MOB Emitter Battery Low Status', "", '', mob_emitter_battery_low_status, mob_emitter_battery_low_status_raw))

    # reserved_275 | Offset: 275, Length: 5, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_275_raw = (data_raw >> 275) & 0x1F
    reserved_275 = reserved_275_raw * 1 if reserved_275_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_275', 'Reserved', "", '', reserved_275, reserved_275_raw))

    return nmea2000Message

def encode_pgn_127233(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127233."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # mob_emitter_id | Offset: 8, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'mob_emitter_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'MOB Emitter ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # man_overboard_status | Offset: 40, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MOB_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'man_overboard_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Man Overboard Status'")
    data_raw |= (field_value & 0x7) << 40
    # reserved_43 | Offset: 43, Length: 5, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_43'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1F) << 43
    # activation_time | Offset: 48, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'activation_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Activation Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 48
    
    # position_source | Offset: 80, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MOB_POSITION_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'position_source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Source'")
    data_raw |= (field_value & 0x7) << 80
    # reserved_83 | Offset: 83, Length: 5, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_83'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1F) << 83
    # position_date | Offset: 88, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Date'")
    data_raw |= (field_value & 0xFFFF) << 88
    # position_time | Offset: 104, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 104
    
    # latitude | Offset: 136, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 136
    
    # longitude | Offset: 168, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 168
    
    # cog_reference | Offset: 200, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIRECTION_REFERENCE(f.value) for f in nmea2000Message.fields if f.id == 'cog_reference'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'COG Reference'")
    data_raw |= (field_value & 0x3) << 200
    # reserved_202 | Offset: 202, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_202'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 202
    # cog | Offset: 208, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'cog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'COG'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 208
    
    # sog | Offset: 224, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SOG'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 224
    
    # mmsi_of_vessel_of_origin | Offset: 240, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'mmsi_of_vessel_of_origin'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'MMSI of vessel of origin'")
    data_raw |= (field_value & 0xFFFFFFFF) << 240
    # mob_emitter_battery_low_status | Offset: 272, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_LOW_BATTERY(f.value) for f in nmea2000Message.fields if f.id == 'mob_emitter_battery_low_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'MOB Emitter Battery Low Status'")
    data_raw |= (field_value & 0x7) << 272
    # reserved_275 | Offset: 275, Length: 5, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_275'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1F) << 275
    return data_raw


def is_fast_pgn_127237() -> bool:
    """Return True if PGN 127237 is a fast PGN."""
    return True
def decode_pgn_127237(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127237."""
    nmea2000Message = NMEA2000Message(127237, 'headingTrackControl', 'Heading/Track control')
    # rudder_limit_exceeded | Offset: 0, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    rudder_limit_exceeded_raw = (data_raw >> 0) & 0x3
    rudder_limit_exceeded = lookup_YES_NO(rudder_limit_exceeded_raw)
    nmea2000Message.fields.append(NMEA2000Field('rudder_limit_exceeded', 'Rudder Limit Exceeded', "", '', rudder_limit_exceeded, rudder_limit_exceeded_raw))

    # off_heading_limit_exceeded | Offset: 2, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    off_heading_limit_exceeded_raw = (data_raw >> 2) & 0x3
    off_heading_limit_exceeded = lookup_YES_NO(off_heading_limit_exceeded_raw)
    nmea2000Message.fields.append(NMEA2000Field('off_heading_limit_exceeded', 'Off-Heading Limit Exceeded', "", '', off_heading_limit_exceeded, off_heading_limit_exceeded_raw))

    # off_track_limit_exceeded | Offset: 4, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    off_track_limit_exceeded_raw = (data_raw >> 4) & 0x3
    off_track_limit_exceeded = lookup_YES_NO(off_track_limit_exceeded_raw)
    nmea2000Message.fields.append(NMEA2000Field('off_track_limit_exceeded', 'Off-Track Limit Exceeded', "", '', off_track_limit_exceeded, off_track_limit_exceeded_raw))

    # override | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    override_raw = (data_raw >> 6) & 0x3
    override = lookup_YES_NO(override_raw)
    nmea2000Message.fields.append(NMEA2000Field('override', 'Override', "", '', override, override_raw))

    # steering_mode | Offset: 8, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    steering_mode_raw = (data_raw >> 8) & 0x7
    steering_mode = lookup_STEERING_MODE(steering_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('steering_mode', 'Steering Mode', "", '', steering_mode, steering_mode_raw))

    # turn_mode | Offset: 11, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    turn_mode_raw = (data_raw >> 11) & 0x7
    turn_mode = lookup_TURN_MODE(turn_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('turn_mode', 'Turn Mode', "", '', turn_mode, turn_mode_raw))

    # heading_reference | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    heading_reference_raw = (data_raw >> 14) & 0x3
    heading_reference = lookup_DIRECTION_REFERENCE(heading_reference_raw)
    nmea2000Message.fields.append(NMEA2000Field('heading_reference', 'Heading Reference', "", '', heading_reference, heading_reference_raw))

    # reserved_16 | Offset: 16, Length: 5, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0x1F
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # commanded_rudder_direction | Offset: 21, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    commanded_rudder_direction_raw = (data_raw >> 21) & 0x7
    commanded_rudder_direction = lookup_DIRECTION_RUDDER(commanded_rudder_direction_raw)
    nmea2000Message.fields.append(NMEA2000Field('commanded_rudder_direction', 'Commanded Rudder Direction', "", '', commanded_rudder_direction, commanded_rudder_direction_raw))

    # commanded_rudder_angle | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    commanded_rudder_angle_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    if commanded_rudder_angle_raw is not None and commanded_rudder_angle_raw & (1 << (16 - 1)):
        commanded_rudder_angle_raw -= (1 << 16)
    commanded_rudder_angle = commanded_rudder_angle_raw * 0.0001 if commanded_rudder_angle_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('commanded_rudder_angle', 'Commanded Rudder Angle', "", 'rad', commanded_rudder_angle, commanded_rudder_angle_raw))

    # heading_to_steer__course_ | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    heading_to_steer__course__raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    heading_to_steer__course_ = heading_to_steer__course__raw * 0.0001 if heading_to_steer__course__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('heading_to_steer__course_', 'Heading-To-Steer (Course)', "", 'rad', heading_to_steer__course_, heading_to_steer__course__raw))

    # track | Offset: 56, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    track_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    track = track_raw * 0.0001 if track_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('track', 'Track', "", 'rad', track, track_raw))

    # rudder_limit | Offset: 72, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    rudder_limit_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    rudder_limit = rudder_limit_raw * 0.0001 if rudder_limit_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rudder_limit', 'Rudder Limit', "", 'rad', rudder_limit, rudder_limit_raw))

    # off_heading_limit | Offset: 88, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    off_heading_limit_raw = decode_number((data_raw >> 88) & 0xFFFF, 16)
    off_heading_limit = off_heading_limit_raw * 0.0001 if off_heading_limit_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('off_heading_limit', 'Off-Heading Limit', "", 'rad', off_heading_limit, off_heading_limit_raw))

    # radius_of_turn_order | Offset: 104, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    radius_of_turn_order_raw = decode_number((data_raw >> 104) & 0xFFFF, 16)
    if radius_of_turn_order_raw is not None and radius_of_turn_order_raw & (1 << (16 - 1)):
        radius_of_turn_order_raw -= (1 << 16)
    radius_of_turn_order = radius_of_turn_order_raw * 0.0001 if radius_of_turn_order_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('radius_of_turn_order', 'Radius of Turn Order', "", 'rad', radius_of_turn_order, radius_of_turn_order_raw))

    # rate_of_turn_order | Offset: 120, Length: 16, Resolution: 3.125e-05, Field Type: NUMBER, Match: 
    rate_of_turn_order_raw = decode_number((data_raw >> 120) & 0xFFFF, 16)
    if rate_of_turn_order_raw is not None and rate_of_turn_order_raw & (1 << (16 - 1)):
        rate_of_turn_order_raw -= (1 << 16)
    rate_of_turn_order = rate_of_turn_order_raw * 3.125e-05 if rate_of_turn_order_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rate_of_turn_order', 'Rate of Turn Order', "", 'rad/s', rate_of_turn_order, rate_of_turn_order_raw))

    # off_track_limit | Offset: 136, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    off_track_limit_raw = decode_number((data_raw >> 136) & 0xFFFF, 16)
    if off_track_limit_raw is not None and off_track_limit_raw & (1 << (16 - 1)):
        off_track_limit_raw -= (1 << 16)
    off_track_limit = off_track_limit_raw * 1 if off_track_limit_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('off_track_limit', 'Off-Track Limit', "", 'm', off_track_limit, off_track_limit_raw))

    # vessel_heading | Offset: 152, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    vessel_heading_raw = decode_number((data_raw >> 152) & 0xFFFF, 16)
    vessel_heading = vessel_heading_raw * 0.0001 if vessel_heading_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('vessel_heading', 'Vessel Heading', "", 'rad', vessel_heading, vessel_heading_raw))

    return nmea2000Message

def encode_pgn_127237(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127237."""
    data_raw = 0
    # rudder_limit_exceeded | Offset: 0, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'rudder_limit_exceeded'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rudder Limit Exceeded'")
    data_raw |= (field_value & 0x3) << 0
    # off_heading_limit_exceeded | Offset: 2, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'off_heading_limit_exceeded'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Off-Heading Limit Exceeded'")
    data_raw |= (field_value & 0x3) << 2
    # off_track_limit_exceeded | Offset: 4, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'off_track_limit_exceeded'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Off-Track Limit Exceeded'")
    data_raw |= (field_value & 0x3) << 4
    # override | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'override'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Override'")
    data_raw |= (field_value & 0x3) << 6
    # steering_mode | Offset: 8, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_STEERING_MODE(f.value) for f in nmea2000Message.fields if f.id == 'steering_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Steering Mode'")
    data_raw |= (field_value & 0x7) << 8
    # turn_mode | Offset: 11, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TURN_MODE(f.value) for f in nmea2000Message.fields if f.id == 'turn_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Turn Mode'")
    data_raw |= (field_value & 0x7) << 11
    # heading_reference | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIRECTION_REFERENCE(f.value) for f in nmea2000Message.fields if f.id == 'heading_reference'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Heading Reference'")
    data_raw |= (field_value & 0x3) << 14
    # reserved_16 | Offset: 16, Length: 5, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1F) << 16
    # commanded_rudder_direction | Offset: 21, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIRECTION_RUDDER(f.value) for f in nmea2000Message.fields if f.id == 'commanded_rudder_direction'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Commanded Rudder Direction'")
    data_raw |= (field_value & 0x7) << 21
    # commanded_rudder_angle | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'commanded_rudder_angle'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Commanded Rudder Angle'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 24
    
    # heading_to_steer__course_ | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'heading_to_steer__course_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Heading-To-Steer (Course)'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 40
    
    # track | Offset: 56, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'track'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Track'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 56
    
    # rudder_limit | Offset: 72, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rudder_limit'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rudder Limit'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 72
    
    # off_heading_limit | Offset: 88, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'off_heading_limit'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Off-Heading Limit'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 88
    
    # radius_of_turn_order | Offset: 104, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'radius_of_turn_order'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Radius of Turn Order'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 104
    
    # rate_of_turn_order | Offset: 120, Length: 16, Resolution: 3.125e-05, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rate_of_turn_order'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rate of Turn Order'")        
    data_raw |= (int(field_value / 3.125e-05) & 0xFFFF) << 120
    
    # off_track_limit | Offset: 136, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'off_track_limit'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Off-Track Limit'")
    data_raw |= (field_value & 0xFFFF) << 136
    # vessel_heading | Offset: 152, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'vessel_heading'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Vessel Heading'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 152
    
    return data_raw


def is_fast_pgn_127245() -> bool:
    """Return True if PGN 127245 is a fast PGN."""
    return False
def decode_pgn_127245(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127245."""
    nmea2000Message = NMEA2000Message(127245, 'rudder', 'Rudder')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # direction_order | Offset: 8, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    direction_order_raw = (data_raw >> 8) & 0x7
    direction_order = lookup_DIRECTION_RUDDER(direction_order_raw)
    nmea2000Message.fields.append(NMEA2000Field('direction_order', 'Direction Order', "", '', direction_order, direction_order_raw))

    # reserved_11 | Offset: 11, Length: 5, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x1F
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # angle_order | Offset: 16, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    angle_order_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    if angle_order_raw is not None and angle_order_raw & (1 << (16 - 1)):
        angle_order_raw -= (1 << 16)
    angle_order = angle_order_raw * 0.0001 if angle_order_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('angle_order', 'Angle Order', "", 'rad', angle_order, angle_order_raw))

    # position | Offset: 32, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    position_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    if position_raw is not None and position_raw & (1 << (16 - 1)):
        position_raw -= (1 << 16)
    position = position_raw * 0.0001 if position_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('position', 'Position', "", 'rad', position, position_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_127245(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127245."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # direction_order | Offset: 8, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIRECTION_RUDDER(f.value) for f in nmea2000Message.fields if f.id == 'direction_order'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Direction Order'")
    data_raw |= (field_value & 0x7) << 8
    # reserved_11 | Offset: 11, Length: 5, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1F) << 11
    # angle_order | Offset: 16, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'angle_order'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Angle Order'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 16
    
    # position | Offset: 32, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 32
    
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_127250() -> bool:
    """Return True if PGN 127250 is a fast PGN."""
    return False
def decode_pgn_127250(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127250."""
    nmea2000Message = NMEA2000Message(127250, 'vesselHeading', 'Vessel Heading')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # heading | Offset: 8, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    heading_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    heading = heading_raw * 0.0001 if heading_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('heading', 'Heading', "", 'rad', heading, heading_raw))

    # deviation | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    deviation_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    if deviation_raw is not None and deviation_raw & (1 << (16 - 1)):
        deviation_raw -= (1 << 16)
    deviation = deviation_raw * 0.0001 if deviation_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('deviation', 'Deviation', "", 'rad', deviation, deviation_raw))

    # variation | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    variation_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    if variation_raw is not None and variation_raw & (1 << (16 - 1)):
        variation_raw -= (1 << 16)
    variation = variation_raw * 0.0001 if variation_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('variation', 'Variation', "", 'rad', variation, variation_raw))

    # reference | Offset: 56, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    reference_raw = (data_raw >> 56) & 0x3
    reference = lookup_DIRECTION_REFERENCE(reference_raw)
    nmea2000Message.fields.append(NMEA2000Field('reference', 'Reference', "", '', reference, reference_raw))

    # reserved_58 | Offset: 58, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_58_raw = (data_raw >> 58) & 0x3F
    reserved_58 = reserved_58_raw * 1 if reserved_58_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_58', 'Reserved', "", '', reserved_58, reserved_58_raw))

    return nmea2000Message

def encode_pgn_127250(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127250."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # heading | Offset: 8, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'heading'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Heading'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 8
    
    # deviation | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'deviation'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Deviation'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 24
    
    # variation | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'variation'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Variation'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 40
    
    # reference | Offset: 56, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIRECTION_REFERENCE(f.value) for f in nmea2000Message.fields if f.id == 'reference'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reference'")
    data_raw |= (field_value & 0x3) << 56
    # reserved_58 | Offset: 58, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_58'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 58
    return data_raw


def is_fast_pgn_127251() -> bool:
    """Return True if PGN 127251 is a fast PGN."""
    return False
def decode_pgn_127251(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127251."""
    nmea2000Message = NMEA2000Message(127251, 'rateOfTurn', 'Rate of Turn')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # rate | Offset: 8, Length: 32, Resolution: 3.125e-08, Field Type: NUMBER, Match: 
    rate_raw = decode_number((data_raw >> 8) & 0xFFFFFFFF, 32)
    if rate_raw is not None and rate_raw & (1 << (32 - 1)):
        rate_raw -= (1 << 32)
    rate = rate_raw * 3.125e-08 if rate_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rate', 'Rate', "", 'rad/s', rate, rate_raw))

    # reserved_40 | Offset: 40, Length: 24, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0xFFFFFF
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    return nmea2000Message

def encode_pgn_127251(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127251."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # rate | Offset: 8, Length: 32, Resolution: 3.125e-08, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rate'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rate'")        
    data_raw |= (int(field_value / 3.125e-08) & 0xFFFFFFFF) << 8
    
    # reserved_40 | Offset: 40, Length: 24, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    return data_raw


def is_fast_pgn_127252() -> bool:
    """Return True if PGN 127252 is a fast PGN."""
    return False
def decode_pgn_127252(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127252."""
    nmea2000Message = NMEA2000Message(127252, 'heave', 'Heave')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # heave | Offset: 8, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    heave_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    if heave_raw is not None and heave_raw & (1 << (16 - 1)):
        heave_raw -= (1 << 16)
    heave = heave_raw * 0.01 if heave_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('heave', 'Heave', "", 'm', heave, heave_raw))

    # reserved_24 | Offset: 24, Length: 40, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_24_raw = (data_raw >> 24) & 0xFFFFFFFFFF
    reserved_24 = reserved_24_raw * 1 if reserved_24_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_24', 'Reserved', "", '', reserved_24, reserved_24_raw))

    return nmea2000Message

def encode_pgn_127252(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127252."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # heave | Offset: 8, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'heave'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Heave'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 8
    
    # reserved_24 | Offset: 24, Length: 40, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_24'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFFFF) << 24
    return data_raw


def is_fast_pgn_127257() -> bool:
    """Return True if PGN 127257 is a fast PGN."""
    return False
def decode_pgn_127257(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127257."""
    nmea2000Message = NMEA2000Message(127257, 'attitude', 'Attitude')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # yaw | Offset: 8, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    yaw_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    if yaw_raw is not None and yaw_raw & (1 << (16 - 1)):
        yaw_raw -= (1 << 16)
    yaw = yaw_raw * 0.0001 if yaw_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('yaw', 'Yaw', "", 'rad', yaw, yaw_raw))

    # pitch | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    pitch_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    if pitch_raw is not None and pitch_raw & (1 << (16 - 1)):
        pitch_raw -= (1 << 16)
    pitch = pitch_raw * 0.0001 if pitch_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pitch', 'Pitch', "", 'rad', pitch, pitch_raw))

    # roll | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    roll_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    if roll_raw is not None and roll_raw & (1 << (16 - 1)):
        roll_raw -= (1 << 16)
    roll = roll_raw * 0.0001 if roll_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('roll', 'Roll', "", 'rad', roll, roll_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_127257(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127257."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # yaw | Offset: 8, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'yaw'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Yaw'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 8
    
    # pitch | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pitch'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Pitch'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 24
    
    # roll | Offset: 40, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'roll'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Roll'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 40
    
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_127258() -> bool:
    """Return True if PGN 127258 is a fast PGN."""
    return False
def decode_pgn_127258(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127258."""
    nmea2000Message = NMEA2000Message(127258, 'magneticVariation', 'Magnetic Variation')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # source | Offset: 8, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 8) & 0xF
    source = lookup_MAGNETIC_VARIATION(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_12_raw = (data_raw >> 12) & 0xF
    reserved_12 = reserved_12_raw * 1 if reserved_12_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_12', 'Reserved', "", '', reserved_12, reserved_12_raw))

    # age_of_service | Offset: 16, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    age_of_service_raw = (data_raw >> 16) & 0xFFFF
    age_of_service = decode_date(age_of_service_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('age_of_service', 'Age of service', "", 'd', age_of_service, age_of_service_raw))

    # variation | Offset: 32, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    variation_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    if variation_raw is not None and variation_raw & (1 << (16 - 1)):
        variation_raw -= (1 << 16)
    variation = variation_raw * 0.0001 if variation_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('variation', 'Variation', "", 'rad', variation, variation_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_127258(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127258."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # source | Offset: 8, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MAGNETIC_VARIATION(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xF) << 8
    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_12'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 12
    # age_of_service | Offset: 16, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'age_of_service'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Age of service'")
    data_raw |= (field_value & 0xFFFF) << 16
    # variation | Offset: 32, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'variation'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Variation'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 32
    
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_127488() -> bool:
    """Return True if PGN 127488 is a fast PGN."""
    return False
def decode_pgn_127488(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127488."""
    nmea2000Message = NMEA2000Message(127488, 'engineParametersRapidUpdate', 'Engine Parameters, Rapid Update')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    instance_raw = (data_raw >> 0) & 0xFF
    instance = lookup_ENGINE_INSTANCE(instance_raw)
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # speed | Offset: 8, Length: 16, Resolution: 0.25, Field Type: NUMBER, Match: 
    speed_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    speed = speed_raw * 0.25 if speed_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('speed', 'Speed', "", 'rpm', speed, speed_raw))

    # boost_pressure | Offset: 24, Length: 16, Resolution: 100, Field Type: NUMBER, Match: 
    boost_pressure_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    boost_pressure = boost_pressure_raw * 100 if boost_pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('boost_pressure', 'Boost Pressure', "", 'Pa', boost_pressure, boost_pressure_raw))

    # tilt_trim | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    tilt_trim_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    if tilt_trim_raw is not None and tilt_trim_raw & (1 << (8 - 1)):
        tilt_trim_raw -= (1 << 8)
    tilt_trim = tilt_trim_raw * 1 if tilt_trim_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('tilt_trim', 'Tilt/Trim', "", '%', tilt_trim, tilt_trim_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_127488(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127488."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENGINE_INSTANCE(f.value) for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # speed | Offset: 8, Length: 16, Resolution: 0.25, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'speed'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Speed'")        
    data_raw |= (int(field_value / 0.25) & 0xFFFF) << 8
    
    # boost_pressure | Offset: 24, Length: 16, Resolution: 100, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'boost_pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Boost Pressure'")        
    data_raw |= (int(field_value / 100) & 0xFFFF) << 24
    
    # tilt_trim | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'tilt_trim'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Tilt/Trim'")
    data_raw |= (field_value & 0xFF) << 40
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_127489() -> bool:
    """Return True if PGN 127489 is a fast PGN."""
    return True
def decode_pgn_127489(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127489."""
    nmea2000Message = NMEA2000Message(127489, 'engineParametersDynamic', 'Engine Parameters, Dynamic')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    instance_raw = (data_raw >> 0) & 0xFF
    instance = lookup_ENGINE_INSTANCE(instance_raw)
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # oil_pressure | Offset: 8, Length: 16, Resolution: 100, Field Type: NUMBER, Match: 
    oil_pressure_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    oil_pressure = oil_pressure_raw * 100 if oil_pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('oil_pressure', 'Oil pressure', "", 'Pa', oil_pressure, oil_pressure_raw))

    # oil_temperature | Offset: 24, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    oil_temperature_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    oil_temperature = oil_temperature_raw * 0.1 if oil_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('oil_temperature', 'Oil temperature', "", 'K', oil_temperature, oil_temperature_raw))

    # temperature | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    temperature_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    temperature = temperature_raw * 0.01 if temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('temperature', 'Temperature', "", 'K', temperature, temperature_raw))

    # alternator_potential | Offset: 56, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    alternator_potential_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    if alternator_potential_raw is not None and alternator_potential_raw & (1 << (16 - 1)):
        alternator_potential_raw -= (1 << 16)
    alternator_potential = alternator_potential_raw * 0.01 if alternator_potential_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('alternator_potential', 'Alternator Potential', "", 'V', alternator_potential, alternator_potential_raw))

    # fuel_rate | Offset: 72, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    fuel_rate_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    if fuel_rate_raw is not None and fuel_rate_raw & (1 << (16 - 1)):
        fuel_rate_raw -= (1 << 16)
    fuel_rate = fuel_rate_raw * 0.1 if fuel_rate_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('fuel_rate', 'Fuel Rate', "", 'L/h', fuel_rate, fuel_rate_raw))

    # total_engine_hours | Offset: 88, Length: 32, Resolution: 1, Field Type: TIME, Match: 
    total_engine_hours_raw = (data_raw >> 88) & 0xFFFFFFFF
    total_engine_hours = decode_time(total_engine_hours_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('total_engine_hours', 'Total Engine hours', "", 's', total_engine_hours, total_engine_hours_raw))

    # coolant_pressure | Offset: 120, Length: 16, Resolution: 100, Field Type: NUMBER, Match: 
    coolant_pressure_raw = decode_number((data_raw >> 120) & 0xFFFF, 16)
    coolant_pressure = coolant_pressure_raw * 100 if coolant_pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('coolant_pressure', 'Coolant Pressure', "", 'Pa', coolant_pressure, coolant_pressure_raw))

    # fuel_pressure | Offset: 136, Length: 16, Resolution: 1000, Field Type: NUMBER, Match: 
    fuel_pressure_raw = decode_number((data_raw >> 136) & 0xFFFF, 16)
    fuel_pressure = fuel_pressure_raw * 1000 if fuel_pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('fuel_pressure', 'Fuel Pressure', "", 'Pa', fuel_pressure, fuel_pressure_raw))

    # reserved_152 | Offset: 152, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_152_raw = (data_raw >> 152) & 0xFF
    reserved_152 = reserved_152_raw * 1 if reserved_152_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_152', 'Reserved', "", '', reserved_152, reserved_152_raw))

    # discrete_status_1 | Offset: 160, Length: 16, Resolution: 1, Field Type: BITLOOKUP, Match: 
    discrete_status_1_raw = (data_raw >> 160) & 0xFFFF
    discrete_status_1 = discrete_status_1_raw * 1 if discrete_status_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('discrete_status_1', 'Discrete Status 1', "", '', discrete_status_1, discrete_status_1_raw))

    # discrete_status_2 | Offset: 176, Length: 16, Resolution: 1, Field Type: BITLOOKUP, Match: 
    discrete_status_2_raw = (data_raw >> 176) & 0xFFFF
    discrete_status_2 = discrete_status_2_raw * 1 if discrete_status_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('discrete_status_2', 'Discrete Status 2', "", '', discrete_status_2, discrete_status_2_raw))

    # engine_load | Offset: 192, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    engine_load_raw = decode_number((data_raw >> 192) & 0xFF, 8)
    if engine_load_raw is not None and engine_load_raw & (1 << (8 - 1)):
        engine_load_raw -= (1 << 8)
    engine_load = engine_load_raw * 1 if engine_load_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('engine_load', 'Engine Load', "", '%', engine_load, engine_load_raw))

    # engine_torque | Offset: 200, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    engine_torque_raw = decode_number((data_raw >> 200) & 0xFF, 8)
    if engine_torque_raw is not None and engine_torque_raw & (1 << (8 - 1)):
        engine_torque_raw -= (1 << 8)
    engine_torque = engine_torque_raw * 1 if engine_torque_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('engine_torque', 'Engine Torque', "", '%', engine_torque, engine_torque_raw))

    return nmea2000Message

def encode_pgn_127489(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127489."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENGINE_INSTANCE(f.value) for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # oil_pressure | Offset: 8, Length: 16, Resolution: 100, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'oil_pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Oil pressure'")        
    data_raw |= (int(field_value / 100) & 0xFFFF) << 8
    
    # oil_temperature | Offset: 24, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'oil_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Oil temperature'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 24
    
    # temperature | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 40
    
    # alternator_potential | Offset: 56, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'alternator_potential'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alternator Potential'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 56
    
    # fuel_rate | Offset: 72, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'fuel_rate'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Fuel Rate'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 72
    
    # total_engine_hours | Offset: 88, Length: 32, Resolution: 1, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_engine_hours'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total Engine hours'")
    data_raw |= (field_value & 0xFFFFFFFF) << 88
    # coolant_pressure | Offset: 120, Length: 16, Resolution: 100, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'coolant_pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Coolant Pressure'")        
    data_raw |= (int(field_value / 100) & 0xFFFF) << 120
    
    # fuel_pressure | Offset: 136, Length: 16, Resolution: 1000, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'fuel_pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Fuel Pressure'")        
    data_raw |= (int(field_value / 1000) & 0xFFFF) << 136
    
    # reserved_152 | Offset: 152, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_152'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 152
    # discrete_status_1 | Offset: 160, Length: 16, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'discrete_status_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Discrete Status 1'")
    data_raw |= (field_value & 0xFFFF) << 160
    # discrete_status_2 | Offset: 176, Length: 16, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'discrete_status_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Discrete Status 2'")
    data_raw |= (field_value & 0xFFFF) << 176
    # engine_load | Offset: 192, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'engine_load'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Engine Load'")
    data_raw |= (field_value & 0xFF) << 192
    # engine_torque | Offset: 200, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'engine_torque'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Engine Torque'")
    data_raw |= (field_value & 0xFF) << 200
    return data_raw


def is_fast_pgn_127490() -> bool:
    """Return True if PGN 127490 is a fast PGN."""
    return True
def decode_pgn_127490(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127490."""
    nmea2000Message = NMEA2000Message(127490, 'electricDriveStatusDynamic', 'Electric Drive Status, Dynamic')
    # inverter_motor_identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    inverter_motor_identifier_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    inverter_motor_identifier = inverter_motor_identifier_raw * 1 if inverter_motor_identifier_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('inverter_motor_identifier', 'Inverter/Motor Identifier', "", '', inverter_motor_identifier, inverter_motor_identifier_raw))

    # operating_mode | Offset: 8, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    operating_mode_raw = decode_number((data_raw >> 8) & 0xF, 4)
    operating_mode = operating_mode_raw * 1 if operating_mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('operating_mode', 'Operating Mode', "", '', operating_mode, operating_mode_raw))

    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_12_raw = (data_raw >> 12) & 0xF
    reserved_12 = reserved_12_raw * 1 if reserved_12_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_12', 'Reserved', "", '', reserved_12, reserved_12_raw))

    # motor_temperature | Offset: 16, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    motor_temperature_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    motor_temperature = motor_temperature_raw * 0.01 if motor_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('motor_temperature', 'Motor Temperature', "", 'K', motor_temperature, motor_temperature_raw))

    # inverter_temperature | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    inverter_temperature_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    inverter_temperature = inverter_temperature_raw * 0.01 if inverter_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('inverter_temperature', 'Inverter Temperature', "", 'K', inverter_temperature, inverter_temperature_raw))

    # coolant_temperature | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    coolant_temperature_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    coolant_temperature = coolant_temperature_raw * 0.01 if coolant_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('coolant_temperature', 'Coolant Temperature', "", 'K', coolant_temperature, coolant_temperature_raw))

    # gear_temperature | Offset: 64, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    gear_temperature_raw = decode_number((data_raw >> 64) & 0xFFFF, 16)
    gear_temperature = gear_temperature_raw * 0.01 if gear_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('gear_temperature', 'Gear Temperature', "", 'K', gear_temperature, gear_temperature_raw))

    # shaft_torque | Offset: 80, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    shaft_torque_raw = decode_number((data_raw >> 80) & 0xFFFF, 16)
    shaft_torque = shaft_torque_raw * 1 if shaft_torque_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('shaft_torque', 'Shaft Torque', "", '', shaft_torque, shaft_torque_raw))

    return nmea2000Message

def encode_pgn_127490(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127490."""
    data_raw = 0
    # inverter_motor_identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'inverter_motor_identifier'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Inverter/Motor Identifier'")
    data_raw |= (field_value & 0xFF) << 0
    # operating_mode | Offset: 8, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'operating_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Operating Mode'")
    data_raw |= (field_value & 0xF) << 8
    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_12'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 12
    # motor_temperature | Offset: 16, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'motor_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 16
    
    # inverter_temperature | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'inverter_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Inverter Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 32
    
    # coolant_temperature | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'coolant_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Coolant Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 48
    
    # gear_temperature | Offset: 64, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'gear_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Gear Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 64
    
    # shaft_torque | Offset: 80, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'shaft_torque'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Shaft Torque'")
    data_raw |= (field_value & 0xFFFF) << 80
    return data_raw


def is_fast_pgn_127491() -> bool:
    """Return True if PGN 127491 is a fast PGN."""
    return True
def decode_pgn_127491(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127491."""
    nmea2000Message = NMEA2000Message(127491, 'electricEnergyStorageStatusDynamic', 'Electric Energy Storage Status, Dynamic')
    # energy_storage_identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    energy_storage_identifier_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    energy_storage_identifier = energy_storage_identifier_raw * 1 if energy_storage_identifier_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('energy_storage_identifier', 'Energy Storage Identifier', "", '', energy_storage_identifier, energy_storage_identifier_raw))

    # state_of_charge | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    state_of_charge_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    state_of_charge = state_of_charge_raw * 1 if state_of_charge_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('state_of_charge', 'State of Charge', "", '', state_of_charge, state_of_charge_raw))

    # time_remaining | Offset: 16, Length: 16, Resolution: 60, Field Type: TIME, Match: 
    time_remaining_raw = (data_raw >> 16) & 0xFFFF
    time_remaining = decode_time(time_remaining_raw * 60)
    nmea2000Message.fields.append(NMEA2000Field('time_remaining', 'Time Remaining', "Time remaining at current rate of discharge", 's', time_remaining, time_remaining_raw))

    # highest_cell_temperature | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    highest_cell_temperature_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    highest_cell_temperature = highest_cell_temperature_raw * 0.01 if highest_cell_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('highest_cell_temperature', 'Highest Cell Temperature', "", 'K', highest_cell_temperature, highest_cell_temperature_raw))

    # lowest_cell_temperature | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    lowest_cell_temperature_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    lowest_cell_temperature = lowest_cell_temperature_raw * 0.01 if lowest_cell_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('lowest_cell_temperature', 'Lowest Cell Temperature', "", 'K', lowest_cell_temperature, lowest_cell_temperature_raw))

    # average_cell_temperature | Offset: 64, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    average_cell_temperature_raw = decode_number((data_raw >> 64) & 0xFFFF, 16)
    average_cell_temperature = average_cell_temperature_raw * 0.01 if average_cell_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('average_cell_temperature', 'Average Cell Temperature', "", 'K', average_cell_temperature, average_cell_temperature_raw))

    # max_discharge_current | Offset: 80, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    max_discharge_current_raw = decode_number((data_raw >> 80) & 0xFFFF, 16)
    if max_discharge_current_raw is not None and max_discharge_current_raw & (1 << (16 - 1)):
        max_discharge_current_raw -= (1 << 16)
    max_discharge_current = max_discharge_current_raw * 0.1 if max_discharge_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('max_discharge_current', 'Max Discharge Current', "", 'A', max_discharge_current, max_discharge_current_raw))

    # max_charge_current | Offset: 96, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    max_charge_current_raw = decode_number((data_raw >> 96) & 0xFFFF, 16)
    if max_charge_current_raw is not None and max_charge_current_raw & (1 << (16 - 1)):
        max_charge_current_raw -= (1 << 16)
    max_charge_current = max_charge_current_raw * 0.1 if max_charge_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('max_charge_current', 'Max Charge Current', "", 'A', max_charge_current, max_charge_current_raw))

    # cooling_system_status | Offset: 112, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    cooling_system_status_raw = decode_number((data_raw >> 112) & 0xF, 4)
    cooling_system_status = cooling_system_status_raw * 1 if cooling_system_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('cooling_system_status', 'Cooling System Status', "", '', cooling_system_status, cooling_system_status_raw))

    # heating_system_status | Offset: 116, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    heating_system_status_raw = decode_number((data_raw >> 116) & 0xF, 4)
    heating_system_status = heating_system_status_raw * 1 if heating_system_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('heating_system_status', 'Heating System Status', "", '', heating_system_status, heating_system_status_raw))

    return nmea2000Message

def encode_pgn_127491(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127491."""
    data_raw = 0
    # energy_storage_identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'energy_storage_identifier'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Energy Storage Identifier'")
    data_raw |= (field_value & 0xFF) << 0
    # state_of_charge | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'state_of_charge'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'State of Charge'")
    data_raw |= (field_value & 0xFF) << 8
    # time_remaining | Offset: 16, Length: 16, Resolution: 60, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'time_remaining'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time Remaining'")        
    data_raw |= (int(field_value / 60) & 0xFFFF) << 16
    
    # highest_cell_temperature | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'highest_cell_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Highest Cell Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 32
    
    # lowest_cell_temperature | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'lowest_cell_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Lowest Cell Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 48
    
    # average_cell_temperature | Offset: 64, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'average_cell_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Average Cell Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 64
    
    # max_discharge_current | Offset: 80, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'max_discharge_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Max Discharge Current'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 80
    
    # max_charge_current | Offset: 96, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'max_charge_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Max Charge Current'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 96
    
    # cooling_system_status | Offset: 112, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'cooling_system_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Cooling System Status'")
    data_raw |= (field_value & 0xF) << 112
    # heating_system_status | Offset: 116, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'heating_system_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Heating System Status'")
    data_raw |= (field_value & 0xF) << 116
    return data_raw


def is_fast_pgn_127493() -> bool:
    """Return True if PGN 127493 is a fast PGN."""
    return False
def decode_pgn_127493(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127493."""
    nmea2000Message = NMEA2000Message(127493, 'transmissionParametersDynamic', 'Transmission Parameters, Dynamic')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    instance_raw = (data_raw >> 0) & 0xFF
    instance = lookup_ENGINE_INSTANCE(instance_raw)
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # transmission_gear | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    transmission_gear_raw = (data_raw >> 8) & 0x3
    transmission_gear = lookup_GEAR_STATUS(transmission_gear_raw)
    nmea2000Message.fields.append(NMEA2000Field('transmission_gear', 'Transmission Gear', "", '', transmission_gear, transmission_gear_raw))

    # reserved_10 | Offset: 10, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_10_raw = (data_raw >> 10) & 0x3F
    reserved_10 = reserved_10_raw * 1 if reserved_10_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_10', 'Reserved', "", '', reserved_10, reserved_10_raw))

    # oil_pressure | Offset: 16, Length: 16, Resolution: 100, Field Type: NUMBER, Match: 
    oil_pressure_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    oil_pressure = oil_pressure_raw * 100 if oil_pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('oil_pressure', 'Oil pressure', "", 'Pa', oil_pressure, oil_pressure_raw))

    # oil_temperature | Offset: 32, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    oil_temperature_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    oil_temperature = oil_temperature_raw * 0.1 if oil_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('oil_temperature', 'Oil temperature', "", 'K', oil_temperature, oil_temperature_raw))

    # discrete_status_1 | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    discrete_status_1_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    discrete_status_1 = discrete_status_1_raw * 1 if discrete_status_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('discrete_status_1', 'Discrete Status 1', "", '', discrete_status_1, discrete_status_1_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_127493(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127493."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENGINE_INSTANCE(f.value) for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # transmission_gear | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GEAR_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'transmission_gear'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Transmission Gear'")
    data_raw |= (field_value & 0x3) << 8
    # reserved_10 | Offset: 10, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_10'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 10
    # oil_pressure | Offset: 16, Length: 16, Resolution: 100, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'oil_pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Oil pressure'")        
    data_raw |= (int(field_value / 100) & 0xFFFF) << 16
    
    # oil_temperature | Offset: 32, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'oil_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Oil temperature'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 32
    
    # discrete_status_1 | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'discrete_status_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Discrete Status 1'")
    data_raw |= (field_value & 0xFF) << 48
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_127494() -> bool:
    """Return True if PGN 127494 is a fast PGN."""
    return True
def decode_pgn_127494(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127494."""
    nmea2000Message = NMEA2000Message(127494, 'electricDriveInformation', 'Electric Drive Information')
    # inverter_motor_identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    inverter_motor_identifier_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    inverter_motor_identifier = inverter_motor_identifier_raw * 1 if inverter_motor_identifier_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('inverter_motor_identifier', 'Inverter/Motor Identifier', "", '', inverter_motor_identifier, inverter_motor_identifier_raw))

    # motor_type | Offset: 8, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    motor_type_raw = decode_number((data_raw >> 8) & 0xF, 4)
    motor_type = motor_type_raw * 1 if motor_type_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('motor_type', 'Motor Type', "", '', motor_type, motor_type_raw))

    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_12_raw = (data_raw >> 12) & 0xF
    reserved_12 = reserved_12_raw * 1 if reserved_12_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_12', 'Reserved', "", '', reserved_12, reserved_12_raw))

    # motor_voltage_rating | Offset: 16, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    motor_voltage_rating_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    motor_voltage_rating = motor_voltage_rating_raw * 0.1 if motor_voltage_rating_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('motor_voltage_rating', 'Motor Voltage Rating', "", 'V', motor_voltage_rating, motor_voltage_rating_raw))

    # maximum_continuous_motor_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    maximum_continuous_motor_power_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    maximum_continuous_motor_power = maximum_continuous_motor_power_raw * 1 if maximum_continuous_motor_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('maximum_continuous_motor_power', 'Maximum Continuous Motor Power', "", 'W', maximum_continuous_motor_power, maximum_continuous_motor_power_raw))

    # maximum_boost_motor_power | Offset: 64, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    maximum_boost_motor_power_raw = decode_number((data_raw >> 64) & 0xFFFFFFFF, 32)
    maximum_boost_motor_power = maximum_boost_motor_power_raw * 1 if maximum_boost_motor_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('maximum_boost_motor_power', 'Maximum Boost Motor Power', "", 'W', maximum_boost_motor_power, maximum_boost_motor_power_raw))

    # maximum_motor_temperature_rating | Offset: 96, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    maximum_motor_temperature_rating_raw = decode_number((data_raw >> 96) & 0xFFFF, 16)
    maximum_motor_temperature_rating = maximum_motor_temperature_rating_raw * 0.01 if maximum_motor_temperature_rating_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('maximum_motor_temperature_rating', 'Maximum Motor Temperature Rating', "", 'K', maximum_motor_temperature_rating, maximum_motor_temperature_rating_raw))

    # rated_motor_speed | Offset: 112, Length: 16, Resolution: 0.25, Field Type: NUMBER, Match: 
    rated_motor_speed_raw = decode_number((data_raw >> 112) & 0xFFFF, 16)
    rated_motor_speed = rated_motor_speed_raw * 0.25 if rated_motor_speed_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rated_motor_speed', 'Rated Motor Speed', "", 'rpm', rated_motor_speed, rated_motor_speed_raw))

    # maximum_controller_temperature_rating | Offset: 128, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    maximum_controller_temperature_rating_raw = decode_number((data_raw >> 128) & 0xFFFF, 16)
    maximum_controller_temperature_rating = maximum_controller_temperature_rating_raw * 0.01 if maximum_controller_temperature_rating_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('maximum_controller_temperature_rating', 'Maximum Controller Temperature Rating', "", 'K', maximum_controller_temperature_rating, maximum_controller_temperature_rating_raw))

    # motor_shaft_torque_rating | Offset: 144, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    motor_shaft_torque_rating_raw = decode_number((data_raw >> 144) & 0xFFFF, 16)
    motor_shaft_torque_rating = motor_shaft_torque_rating_raw * 1 if motor_shaft_torque_rating_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('motor_shaft_torque_rating', 'Motor Shaft Torque Rating', "", '', motor_shaft_torque_rating, motor_shaft_torque_rating_raw))

    # motor_dc_voltage_derating_threshold | Offset: 160, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    motor_dc_voltage_derating_threshold_raw = decode_number((data_raw >> 160) & 0xFFFF, 16)
    motor_dc_voltage_derating_threshold = motor_dc_voltage_derating_threshold_raw * 0.1 if motor_dc_voltage_derating_threshold_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('motor_dc_voltage_derating_threshold', 'Motor DC-Voltage Derating Threshold', "", 'V', motor_dc_voltage_derating_threshold, motor_dc_voltage_derating_threshold_raw))

    # motor_dc_voltage_cut_off_threshold | Offset: 176, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    motor_dc_voltage_cut_off_threshold_raw = decode_number((data_raw >> 176) & 0xFFFF, 16)
    motor_dc_voltage_cut_off_threshold = motor_dc_voltage_cut_off_threshold_raw * 0.1 if motor_dc_voltage_cut_off_threshold_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('motor_dc_voltage_cut_off_threshold', 'Motor DC-Voltage Cut Off Threshold', "", 'V', motor_dc_voltage_cut_off_threshold, motor_dc_voltage_cut_off_threshold_raw))

    # drive_motor_hours | Offset: 192, Length: 32, Resolution: 1, Field Type: TIME, Match: 
    drive_motor_hours_raw = (data_raw >> 192) & 0xFFFFFFFF
    drive_motor_hours = decode_time(drive_motor_hours_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('drive_motor_hours', 'Drive/Motor Hours', "", 's', drive_motor_hours, drive_motor_hours_raw))

    return nmea2000Message

def encode_pgn_127494(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127494."""
    data_raw = 0
    # inverter_motor_identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'inverter_motor_identifier'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Inverter/Motor Identifier'")
    data_raw |= (field_value & 0xFF) << 0
    # motor_type | Offset: 8, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'motor_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor Type'")
    data_raw |= (field_value & 0xF) << 8
    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_12'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 12
    # motor_voltage_rating | Offset: 16, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'motor_voltage_rating'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor Voltage Rating'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 16
    
    # maximum_continuous_motor_power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'maximum_continuous_motor_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Maximum Continuous Motor Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    # maximum_boost_motor_power | Offset: 64, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'maximum_boost_motor_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Maximum Boost Motor Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 64
    # maximum_motor_temperature_rating | Offset: 96, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'maximum_motor_temperature_rating'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Maximum Motor Temperature Rating'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 96
    
    # rated_motor_speed | Offset: 112, Length: 16, Resolution: 0.25, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rated_motor_speed'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rated Motor Speed'")        
    data_raw |= (int(field_value / 0.25) & 0xFFFF) << 112
    
    # maximum_controller_temperature_rating | Offset: 128, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'maximum_controller_temperature_rating'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Maximum Controller Temperature Rating'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 128
    
    # motor_shaft_torque_rating | Offset: 144, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'motor_shaft_torque_rating'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor Shaft Torque Rating'")
    data_raw |= (field_value & 0xFFFF) << 144
    # motor_dc_voltage_derating_threshold | Offset: 160, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'motor_dc_voltage_derating_threshold'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor DC-Voltage Derating Threshold'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 160
    
    # motor_dc_voltage_cut_off_threshold | Offset: 176, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'motor_dc_voltage_cut_off_threshold'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor DC-Voltage Cut Off Threshold'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 176
    
    # drive_motor_hours | Offset: 192, Length: 32, Resolution: 1, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'drive_motor_hours'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Drive/Motor Hours'")
    data_raw |= (field_value & 0xFFFFFFFF) << 192
    return data_raw


def is_fast_pgn_127495() -> bool:
    """Return True if PGN 127495 is a fast PGN."""
    return True
def decode_pgn_127495(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127495."""
    nmea2000Message = NMEA2000Message(127495, 'electricEnergyStorageInformation', 'Electric Energy Storage Information')
    # energy_storage_identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    energy_storage_identifier_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    energy_storage_identifier = energy_storage_identifier_raw * 1 if energy_storage_identifier_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('energy_storage_identifier', 'Energy Storage Identifier', "", '', energy_storage_identifier, energy_storage_identifier_raw))

    # motor_type | Offset: 8, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    motor_type_raw = decode_number((data_raw >> 8) & 0xF, 4)
    motor_type = motor_type_raw * 1 if motor_type_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('motor_type', 'Motor Type', "", '', motor_type, motor_type_raw))

    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_12_raw = (data_raw >> 12) & 0xF
    reserved_12 = reserved_12_raw * 1 if reserved_12_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_12', 'Reserved', "", '', reserved_12, reserved_12_raw))

    # storage_chemistry_conversion | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    storage_chemistry_conversion_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    storage_chemistry_conversion = storage_chemistry_conversion_raw * 1 if storage_chemistry_conversion_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('storage_chemistry_conversion', 'Storage Chemistry/Conversion', "", '', storage_chemistry_conversion, storage_chemistry_conversion_raw))

    # maximum_temperature_derating | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    maximum_temperature_derating_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    maximum_temperature_derating = maximum_temperature_derating_raw * 0.01 if maximum_temperature_derating_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('maximum_temperature_derating', 'Maximum Temperature Derating', "", 'K', maximum_temperature_derating, maximum_temperature_derating_raw))

    # maximum_temperature_shut_off | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    maximum_temperature_shut_off_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    maximum_temperature_shut_off = maximum_temperature_shut_off_raw * 0.01 if maximum_temperature_shut_off_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('maximum_temperature_shut_off', 'Maximum Temperature Shut Off', "", 'K', maximum_temperature_shut_off, maximum_temperature_shut_off_raw))

    # minimum_temperature_derating | Offset: 56, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    minimum_temperature_derating_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    minimum_temperature_derating = minimum_temperature_derating_raw * 0.01 if minimum_temperature_derating_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('minimum_temperature_derating', 'Minimum Temperature Derating', "", 'K', minimum_temperature_derating, minimum_temperature_derating_raw))

    # minimum_temperature_shut_off | Offset: 72, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    minimum_temperature_shut_off_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    minimum_temperature_shut_off = minimum_temperature_shut_off_raw * 0.01 if minimum_temperature_shut_off_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('minimum_temperature_shut_off', 'Minimum Temperature Shut Off', "", 'K', minimum_temperature_shut_off, minimum_temperature_shut_off_raw))

    # usable_battery_energy | Offset: 88, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    usable_battery_energy_raw = decode_number((data_raw >> 88) & 0xFFFFFFFF, 32)
    usable_battery_energy = usable_battery_energy_raw * 1 if usable_battery_energy_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('usable_battery_energy', 'Usable Battery Energy', "", 'kWh', usable_battery_energy, usable_battery_energy_raw))

    # state_of_health | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    state_of_health_raw = decode_number((data_raw >> 120) & 0xFF, 8)
    state_of_health = state_of_health_raw * 1 if state_of_health_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('state_of_health', 'State of Health', "", '', state_of_health, state_of_health_raw))

    # battery_cycle_counter | Offset: 128, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    battery_cycle_counter_raw = decode_number((data_raw >> 128) & 0xFFFF, 16)
    battery_cycle_counter = battery_cycle_counter_raw * 1 if battery_cycle_counter_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('battery_cycle_counter', 'Battery Cycle Counter', "", '', battery_cycle_counter, battery_cycle_counter_raw))

    # battery_full_status | Offset: 144, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    battery_full_status_raw = decode_number((data_raw >> 144) & 0x3, 2)
    battery_full_status = battery_full_status_raw * 1 if battery_full_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('battery_full_status', 'Battery Full Status', "", '', battery_full_status, battery_full_status_raw))

    # battery_empty_status | Offset: 146, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    battery_empty_status_raw = decode_number((data_raw >> 146) & 0x3, 2)
    battery_empty_status = battery_empty_status_raw * 1 if battery_empty_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('battery_empty_status', 'Battery Empty Status', "", '', battery_empty_status, battery_empty_status_raw))

    # reserved_148 | Offset: 148, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_148_raw = (data_raw >> 148) & 0xF
    reserved_148 = reserved_148_raw * 1 if reserved_148_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_148', 'Reserved', "", '', reserved_148, reserved_148_raw))

    # maximum_charge__soc_ | Offset: 152, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    maximum_charge__soc__raw = decode_number((data_raw >> 152) & 0xFF, 8)
    maximum_charge__soc_ = maximum_charge__soc__raw * 1 if maximum_charge__soc__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('maximum_charge__soc_', 'Maximum Charge (SOC)', "", '', maximum_charge__soc_, maximum_charge__soc__raw))

    # minimum_charge__soc_ | Offset: 160, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    minimum_charge__soc__raw = decode_number((data_raw >> 160) & 0xFF, 8)
    minimum_charge__soc_ = minimum_charge__soc__raw * 1 if minimum_charge__soc__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('minimum_charge__soc_', 'Minimum Charge (SOC)', "", '', minimum_charge__soc_, minimum_charge__soc__raw))

    return nmea2000Message

def encode_pgn_127495(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127495."""
    data_raw = 0
    # energy_storage_identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'energy_storage_identifier'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Energy Storage Identifier'")
    data_raw |= (field_value & 0xFF) << 0
    # motor_type | Offset: 8, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'motor_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor Type'")
    data_raw |= (field_value & 0xF) << 8
    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_12'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 12
    # storage_chemistry_conversion | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'storage_chemistry_conversion'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Storage Chemistry/Conversion'")
    data_raw |= (field_value & 0xFF) << 16
    # maximum_temperature_derating | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'maximum_temperature_derating'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Maximum Temperature Derating'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 24
    
    # maximum_temperature_shut_off | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'maximum_temperature_shut_off'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Maximum Temperature Shut Off'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 40
    
    # minimum_temperature_derating | Offset: 56, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'minimum_temperature_derating'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Minimum Temperature Derating'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 56
    
    # minimum_temperature_shut_off | Offset: 72, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'minimum_temperature_shut_off'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Minimum Temperature Shut Off'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 72
    
    # usable_battery_energy | Offset: 88, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'usable_battery_energy'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Usable Battery Energy'")
    data_raw |= (field_value & 0xFFFFFFFF) << 88
    # state_of_health | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'state_of_health'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'State of Health'")
    data_raw |= (field_value & 0xFF) << 120
    # battery_cycle_counter | Offset: 128, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'battery_cycle_counter'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Battery Cycle Counter'")
    data_raw |= (field_value & 0xFFFF) << 128
    # battery_full_status | Offset: 144, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'battery_full_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Battery Full Status'")
    data_raw |= (field_value & 0x3) << 144
    # battery_empty_status | Offset: 146, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'battery_empty_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Battery Empty Status'")
    data_raw |= (field_value & 0x3) << 146
    # reserved_148 | Offset: 148, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_148'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 148
    # maximum_charge__soc_ | Offset: 152, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'maximum_charge__soc_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Maximum Charge (SOC)'")
    data_raw |= (field_value & 0xFF) << 152
    # minimum_charge__soc_ | Offset: 160, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'minimum_charge__soc_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Minimum Charge (SOC)'")
    data_raw |= (field_value & 0xFF) << 160
    return data_raw


def is_fast_pgn_127496() -> bool:
    """Return True if PGN 127496 is a fast PGN."""
    return True
def decode_pgn_127496(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127496."""
    nmea2000Message = NMEA2000Message(127496, 'tripParametersVessel', 'Trip Parameters, Vessel')
    # time_to_empty | Offset: 0, Length: 32, Resolution: 0.001, Field Type: TIME, Match: 
    time_to_empty_raw = (data_raw >> 0) & 0xFFFFFFFF
    time_to_empty = decode_time(time_to_empty_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('time_to_empty', 'Time to Empty', "", 's', time_to_empty, time_to_empty_raw))

    # distance_to_empty | Offset: 32, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    distance_to_empty_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    distance_to_empty = distance_to_empty_raw * 0.01 if distance_to_empty_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('distance_to_empty', 'Distance to Empty', "", 'm', distance_to_empty, distance_to_empty_raw))

    # estimated_fuel_remaining | Offset: 64, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    estimated_fuel_remaining_raw = decode_number((data_raw >> 64) & 0xFFFF, 16)
    estimated_fuel_remaining = estimated_fuel_remaining_raw * 1 if estimated_fuel_remaining_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('estimated_fuel_remaining', 'Estimated Fuel Remaining', "", 'L', estimated_fuel_remaining, estimated_fuel_remaining_raw))

    # trip_run_time | Offset: 80, Length: 32, Resolution: 0.001, Field Type: TIME, Match: 
    trip_run_time_raw = (data_raw >> 80) & 0xFFFFFFFF
    trip_run_time = decode_time(trip_run_time_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('trip_run_time', 'Trip Run Time', "", 's', trip_run_time, trip_run_time_raw))

    return nmea2000Message

def encode_pgn_127496(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127496."""
    data_raw = 0
    # time_to_empty | Offset: 0, Length: 32, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'time_to_empty'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time to Empty'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFFFF) << 0
    
    # distance_to_empty | Offset: 32, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'distance_to_empty'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Distance to Empty'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 32
    
    # estimated_fuel_remaining | Offset: 64, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'estimated_fuel_remaining'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Estimated Fuel Remaining'")
    data_raw |= (field_value & 0xFFFF) << 64
    # trip_run_time | Offset: 80, Length: 32, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'trip_run_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Trip Run Time'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFFFF) << 80
    
    return data_raw


def is_fast_pgn_127497() -> bool:
    """Return True if PGN 127497 is a fast PGN."""
    return True
def decode_pgn_127497(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127497."""
    nmea2000Message = NMEA2000Message(127497, 'tripParametersEngine', 'Trip Parameters, Engine')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    instance_raw = (data_raw >> 0) & 0xFF
    instance = lookup_ENGINE_INSTANCE(instance_raw)
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # trip_fuel_used | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    trip_fuel_used_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    trip_fuel_used = trip_fuel_used_raw * 1 if trip_fuel_used_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('trip_fuel_used', 'Trip Fuel Used', "", 'L', trip_fuel_used, trip_fuel_used_raw))

    # fuel_rate__average | Offset: 24, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    fuel_rate__average_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    if fuel_rate__average_raw is not None and fuel_rate__average_raw & (1 << (16 - 1)):
        fuel_rate__average_raw -= (1 << 16)
    fuel_rate__average = fuel_rate__average_raw * 0.1 if fuel_rate__average_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('fuel_rate__average', 'Fuel Rate, Average', "", 'L/h', fuel_rate__average, fuel_rate__average_raw))

    # fuel_rate__economy | Offset: 40, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    fuel_rate__economy_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    if fuel_rate__economy_raw is not None and fuel_rate__economy_raw & (1 << (16 - 1)):
        fuel_rate__economy_raw -= (1 << 16)
    fuel_rate__economy = fuel_rate__economy_raw * 0.1 if fuel_rate__economy_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('fuel_rate__economy', 'Fuel Rate, Economy', "", 'L/h', fuel_rate__economy, fuel_rate__economy_raw))

    # instantaneous_fuel_economy | Offset: 56, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    instantaneous_fuel_economy_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    if instantaneous_fuel_economy_raw is not None and instantaneous_fuel_economy_raw & (1 << (16 - 1)):
        instantaneous_fuel_economy_raw -= (1 << 16)
    instantaneous_fuel_economy = instantaneous_fuel_economy_raw * 0.1 if instantaneous_fuel_economy_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instantaneous_fuel_economy', 'Instantaneous Fuel Economy', "", 'L/h', instantaneous_fuel_economy, instantaneous_fuel_economy_raw))

    return nmea2000Message

def encode_pgn_127497(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127497."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENGINE_INSTANCE(f.value) for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # trip_fuel_used | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'trip_fuel_used'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Trip Fuel Used'")
    data_raw |= (field_value & 0xFFFF) << 8
    # fuel_rate__average | Offset: 24, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'fuel_rate__average'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Fuel Rate, Average'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 24
    
    # fuel_rate__economy | Offset: 40, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'fuel_rate__economy'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Fuel Rate, Economy'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 40
    
    # instantaneous_fuel_economy | Offset: 56, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instantaneous_fuel_economy'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instantaneous Fuel Economy'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 56
    
    return data_raw


def is_fast_pgn_127498() -> bool:
    """Return True if PGN 127498 is a fast PGN."""
    return True
def decode_pgn_127498(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127498."""
    nmea2000Message = NMEA2000Message(127498, 'engineParametersStatic', 'Engine Parameters, Static')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    instance_raw = (data_raw >> 0) & 0xFF
    instance = lookup_ENGINE_INSTANCE(instance_raw)
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # rated_engine_speed | Offset: 8, Length: 16, Resolution: 0.25, Field Type: NUMBER, Match: 
    rated_engine_speed_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    rated_engine_speed = rated_engine_speed_raw * 0.25 if rated_engine_speed_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rated_engine_speed', 'Rated Engine Speed', "", 'rpm', rated_engine_speed, rated_engine_speed_raw))

    # vin | Offset: 24, Length: 136, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # software_id | Offset: 160, Length: 256, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_127498(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127498."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENGINE_INSTANCE(f.value) for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # rated_engine_speed | Offset: 8, Length: 16, Resolution: 0.25, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rated_engine_speed'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rated Engine Speed'")        
    data_raw |= (int(field_value / 0.25) & 0xFFFF) << 8
    
    # vin | Offset: 24, Length: 136, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'VIN'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 24
    # software_id | Offset: 160, Length: 256, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Software ID'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 160
    return data_raw


def is_fast_pgn_127500() -> bool:
    """Return True if PGN 127500 is a fast PGN."""
    return False
def decode_pgn_127500(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127500."""
    nmea2000Message = NMEA2000Message(127500, 'loadControllerConnectionStateControl', 'Load Controller Connection State/Control')
    # sequence_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sequence_id_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sequence_id = sequence_id_raw * 1 if sequence_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sequence_id', 'Sequence ID', "", '', sequence_id, sequence_id_raw))

    # connection_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    connection_id_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    connection_id = connection_id_raw * 1 if connection_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('connection_id', 'Connection ID', "", '', connection_id, connection_id_raw))

    # state | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    state_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    state = state_raw * 1 if state_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('state', 'State', "", '', state, state_raw))

    # status | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    status_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    status = status_raw * 1 if status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('status', 'Status', "", '', status, status_raw))

    # operational_status___control | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    operational_status___control_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    operational_status___control = operational_status___control_raw * 1 if operational_status___control_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('operational_status___control', 'Operational Status & Control', "", '', operational_status___control, operational_status___control_raw))

    # pwm_duty_cycle | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    pwm_duty_cycle_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    pwm_duty_cycle = pwm_duty_cycle_raw * 1 if pwm_duty_cycle_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pwm_duty_cycle', 'PWM Duty Cycle', "", '', pwm_duty_cycle, pwm_duty_cycle_raw))

    # timeon | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    timeon_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    timeon = timeon_raw * 1 if timeon_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('timeon', 'TimeON', "", '', timeon, timeon_raw))

    # timeoff | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    timeoff_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    timeoff = timeoff_raw * 1 if timeoff_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('timeoff', 'TimeOFF', "", '', timeoff, timeoff_raw))

    return nmea2000Message

def encode_pgn_127500(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127500."""
    data_raw = 0
    # sequence_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sequence_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sequence ID'")
    data_raw |= (field_value & 0xFF) << 0
    # connection_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'connection_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Connection ID'")
    data_raw |= (field_value & 0xFF) << 8
    # state | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'State'")
    data_raw |= (field_value & 0xFF) << 16
    # status | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Status'")
    data_raw |= (field_value & 0xFF) << 24
    # operational_status___control | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'operational_status___control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Operational Status & Control'")
    data_raw |= (field_value & 0xFF) << 32
    # pwm_duty_cycle | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pwm_duty_cycle'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PWM Duty Cycle'")
    data_raw |= (field_value & 0xFF) << 40
    # timeon | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'timeon'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'TimeON'")
    data_raw |= (field_value & 0xFF) << 48
    # timeoff | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'timeoff'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'TimeOFF'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_127501() -> bool:
    """Return True if PGN 127501 is a fast PGN."""
    return False
def decode_pgn_127501(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127501."""
    nmea2000Message = NMEA2000Message(127501, 'binarySwitchBankStatus', 'Binary Switch Bank Status')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # indicator1 | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator1_raw = (data_raw >> 8) & 0x3
    indicator1 = lookup_OFF_ON(indicator1_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator1', 'Indicator1', "", '', indicator1, indicator1_raw))

    # indicator2 | Offset: 10, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator2_raw = (data_raw >> 10) & 0x3
    indicator2 = lookup_OFF_ON(indicator2_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator2', 'Indicator2', "", '', indicator2, indicator2_raw))

    # indicator3 | Offset: 12, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator3_raw = (data_raw >> 12) & 0x3
    indicator3 = lookup_OFF_ON(indicator3_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator3', 'Indicator3', "", '', indicator3, indicator3_raw))

    # indicator4 | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator4_raw = (data_raw >> 14) & 0x3
    indicator4 = lookup_OFF_ON(indicator4_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator4', 'Indicator4', "", '', indicator4, indicator4_raw))

    # indicator5 | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator5_raw = (data_raw >> 16) & 0x3
    indicator5 = lookup_OFF_ON(indicator5_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator5', 'Indicator5', "", '', indicator5, indicator5_raw))

    # indicator6 | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator6_raw = (data_raw >> 18) & 0x3
    indicator6 = lookup_OFF_ON(indicator6_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator6', 'Indicator6', "", '', indicator6, indicator6_raw))

    # indicator7 | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator7_raw = (data_raw >> 20) & 0x3
    indicator7 = lookup_OFF_ON(indicator7_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator7', 'Indicator7', "", '', indicator7, indicator7_raw))

    # indicator8 | Offset: 22, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator8_raw = (data_raw >> 22) & 0x3
    indicator8 = lookup_OFF_ON(indicator8_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator8', 'Indicator8', "", '', indicator8, indicator8_raw))

    # indicator9 | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator9_raw = (data_raw >> 24) & 0x3
    indicator9 = lookup_OFF_ON(indicator9_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator9', 'Indicator9', "", '', indicator9, indicator9_raw))

    # indicator10 | Offset: 26, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator10_raw = (data_raw >> 26) & 0x3
    indicator10 = lookup_OFF_ON(indicator10_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator10', 'Indicator10', "", '', indicator10, indicator10_raw))

    # indicator11 | Offset: 28, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator11_raw = (data_raw >> 28) & 0x3
    indicator11 = lookup_OFF_ON(indicator11_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator11', 'Indicator11', "", '', indicator11, indicator11_raw))

    # indicator12 | Offset: 30, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator12_raw = (data_raw >> 30) & 0x3
    indicator12 = lookup_OFF_ON(indicator12_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator12', 'Indicator12', "", '', indicator12, indicator12_raw))

    # indicator13 | Offset: 32, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator13_raw = (data_raw >> 32) & 0x3
    indicator13 = lookup_OFF_ON(indicator13_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator13', 'Indicator13', "", '', indicator13, indicator13_raw))

    # indicator14 | Offset: 34, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator14_raw = (data_raw >> 34) & 0x3
    indicator14 = lookup_OFF_ON(indicator14_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator14', 'Indicator14', "", '', indicator14, indicator14_raw))

    # indicator15 | Offset: 36, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator15_raw = (data_raw >> 36) & 0x3
    indicator15 = lookup_OFF_ON(indicator15_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator15', 'Indicator15', "", '', indicator15, indicator15_raw))

    # indicator16 | Offset: 38, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator16_raw = (data_raw >> 38) & 0x3
    indicator16 = lookup_OFF_ON(indicator16_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator16', 'Indicator16', "", '', indicator16, indicator16_raw))

    # indicator17 | Offset: 40, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator17_raw = (data_raw >> 40) & 0x3
    indicator17 = lookup_OFF_ON(indicator17_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator17', 'Indicator17', "", '', indicator17, indicator17_raw))

    # indicator18 | Offset: 42, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator18_raw = (data_raw >> 42) & 0x3
    indicator18 = lookup_OFF_ON(indicator18_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator18', 'Indicator18', "", '', indicator18, indicator18_raw))

    # indicator19 | Offset: 44, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator19_raw = (data_raw >> 44) & 0x3
    indicator19 = lookup_OFF_ON(indicator19_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator19', 'Indicator19', "", '', indicator19, indicator19_raw))

    # indicator20 | Offset: 46, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator20_raw = (data_raw >> 46) & 0x3
    indicator20 = lookup_OFF_ON(indicator20_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator20', 'Indicator20', "", '', indicator20, indicator20_raw))

    # indicator21 | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator21_raw = (data_raw >> 48) & 0x3
    indicator21 = lookup_OFF_ON(indicator21_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator21', 'Indicator21', "", '', indicator21, indicator21_raw))

    # indicator22 | Offset: 50, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator22_raw = (data_raw >> 50) & 0x3
    indicator22 = lookup_OFF_ON(indicator22_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator22', 'Indicator22', "", '', indicator22, indicator22_raw))

    # indicator23 | Offset: 52, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator23_raw = (data_raw >> 52) & 0x3
    indicator23 = lookup_OFF_ON(indicator23_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator23', 'Indicator23', "", '', indicator23, indicator23_raw))

    # indicator24 | Offset: 54, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator24_raw = (data_raw >> 54) & 0x3
    indicator24 = lookup_OFF_ON(indicator24_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator24', 'Indicator24', "", '', indicator24, indicator24_raw))

    # indicator25 | Offset: 56, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator25_raw = (data_raw >> 56) & 0x3
    indicator25 = lookup_OFF_ON(indicator25_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator25', 'Indicator25', "", '', indicator25, indicator25_raw))

    # indicator26 | Offset: 58, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator26_raw = (data_raw >> 58) & 0x3
    indicator26 = lookup_OFF_ON(indicator26_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator26', 'Indicator26', "", '', indicator26, indicator26_raw))

    # indicator27 | Offset: 60, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator27_raw = (data_raw >> 60) & 0x3
    indicator27 = lookup_OFF_ON(indicator27_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator27', 'Indicator27', "", '', indicator27, indicator27_raw))

    # indicator28 | Offset: 62, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    indicator28_raw = (data_raw >> 62) & 0x3
    indicator28 = lookup_OFF_ON(indicator28_raw)
    nmea2000Message.fields.append(NMEA2000Field('indicator28', 'Indicator28', "", '', indicator28, indicator28_raw))

    return nmea2000Message

def encode_pgn_127501(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127501."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # indicator1 | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator1'")
    data_raw |= (field_value & 0x3) << 8
    # indicator2 | Offset: 10, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator2'")
    data_raw |= (field_value & 0x3) << 10
    # indicator3 | Offset: 12, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator3'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator3'")
    data_raw |= (field_value & 0x3) << 12
    # indicator4 | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator4'")
    data_raw |= (field_value & 0x3) << 14
    # indicator5 | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator5'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator5'")
    data_raw |= (field_value & 0x3) << 16
    # indicator6 | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator6'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator6'")
    data_raw |= (field_value & 0x3) << 18
    # indicator7 | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator7'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator7'")
    data_raw |= (field_value & 0x3) << 20
    # indicator8 | Offset: 22, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator8'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator8'")
    data_raw |= (field_value & 0x3) << 22
    # indicator9 | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator9'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator9'")
    data_raw |= (field_value & 0x3) << 24
    # indicator10 | Offset: 26, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator10'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator10'")
    data_raw |= (field_value & 0x3) << 26
    # indicator11 | Offset: 28, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator11'")
    data_raw |= (field_value & 0x3) << 28
    # indicator12 | Offset: 30, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator12'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator12'")
    data_raw |= (field_value & 0x3) << 30
    # indicator13 | Offset: 32, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator13'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator13'")
    data_raw |= (field_value & 0x3) << 32
    # indicator14 | Offset: 34, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator14'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator14'")
    data_raw |= (field_value & 0x3) << 34
    # indicator15 | Offset: 36, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator15'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator15'")
    data_raw |= (field_value & 0x3) << 36
    # indicator16 | Offset: 38, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator16'")
    data_raw |= (field_value & 0x3) << 38
    # indicator17 | Offset: 40, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator17'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator17'")
    data_raw |= (field_value & 0x3) << 40
    # indicator18 | Offset: 42, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator18'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator18'")
    data_raw |= (field_value & 0x3) << 42
    # indicator19 | Offset: 44, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator19'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator19'")
    data_raw |= (field_value & 0x3) << 44
    # indicator20 | Offset: 46, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator20'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator20'")
    data_raw |= (field_value & 0x3) << 46
    # indicator21 | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator21'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator21'")
    data_raw |= (field_value & 0x3) << 48
    # indicator22 | Offset: 50, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator22'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator22'")
    data_raw |= (field_value & 0x3) << 50
    # indicator23 | Offset: 52, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator23'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator23'")
    data_raw |= (field_value & 0x3) << 52
    # indicator24 | Offset: 54, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator24'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator24'")
    data_raw |= (field_value & 0x3) << 54
    # indicator25 | Offset: 56, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator25'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator25'")
    data_raw |= (field_value & 0x3) << 56
    # indicator26 | Offset: 58, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator26'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator26'")
    data_raw |= (field_value & 0x3) << 58
    # indicator27 | Offset: 60, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator27'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator27'")
    data_raw |= (field_value & 0x3) << 60
    # indicator28 | Offset: 62, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'indicator28'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator28'")
    data_raw |= (field_value & 0x3) << 62
    return data_raw


def is_fast_pgn_127502() -> bool:
    """Return True if PGN 127502 is a fast PGN."""
    return False
def decode_pgn_127502(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127502."""
    nmea2000Message = NMEA2000Message(127502, 'switchBankControl', 'Switch Bank Control')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # switch1 | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch1_raw = (data_raw >> 8) & 0x3
    switch1 = lookup_OFF_ON(switch1_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch1', 'Switch1', "", '', switch1, switch1_raw))

    # switch2 | Offset: 10, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch2_raw = (data_raw >> 10) & 0x3
    switch2 = lookup_OFF_ON(switch2_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch2', 'Switch2', "", '', switch2, switch2_raw))

    # switch3 | Offset: 12, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch3_raw = (data_raw >> 12) & 0x3
    switch3 = lookup_OFF_ON(switch3_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch3', 'Switch3', "", '', switch3, switch3_raw))

    # switch4 | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch4_raw = (data_raw >> 14) & 0x3
    switch4 = lookup_OFF_ON(switch4_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch4', 'Switch4', "", '', switch4, switch4_raw))

    # switch5 | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch5_raw = (data_raw >> 16) & 0x3
    switch5 = lookup_OFF_ON(switch5_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch5', 'Switch5', "", '', switch5, switch5_raw))

    # switch6 | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch6_raw = (data_raw >> 18) & 0x3
    switch6 = lookup_OFF_ON(switch6_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch6', 'Switch6', "", '', switch6, switch6_raw))

    # switch7 | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch7_raw = (data_raw >> 20) & 0x3
    switch7 = lookup_OFF_ON(switch7_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch7', 'Switch7', "", '', switch7, switch7_raw))

    # switch8 | Offset: 22, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch8_raw = (data_raw >> 22) & 0x3
    switch8 = lookup_OFF_ON(switch8_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch8', 'Switch8', "", '', switch8, switch8_raw))

    # switch9 | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch9_raw = (data_raw >> 24) & 0x3
    switch9 = lookup_OFF_ON(switch9_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch9', 'Switch9', "", '', switch9, switch9_raw))

    # switch10 | Offset: 26, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch10_raw = (data_raw >> 26) & 0x3
    switch10 = lookup_OFF_ON(switch10_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch10', 'Switch10', "", '', switch10, switch10_raw))

    # switch11 | Offset: 28, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch11_raw = (data_raw >> 28) & 0x3
    switch11 = lookup_OFF_ON(switch11_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch11', 'Switch11', "", '', switch11, switch11_raw))

    # switch12 | Offset: 30, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch12_raw = (data_raw >> 30) & 0x3
    switch12 = lookup_OFF_ON(switch12_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch12', 'Switch12', "", '', switch12, switch12_raw))

    # switch13 | Offset: 32, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch13_raw = (data_raw >> 32) & 0x3
    switch13 = lookup_OFF_ON(switch13_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch13', 'Switch13', "", '', switch13, switch13_raw))

    # switch14 | Offset: 34, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch14_raw = (data_raw >> 34) & 0x3
    switch14 = lookup_OFF_ON(switch14_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch14', 'Switch14', "", '', switch14, switch14_raw))

    # switch15 | Offset: 36, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch15_raw = (data_raw >> 36) & 0x3
    switch15 = lookup_OFF_ON(switch15_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch15', 'Switch15', "", '', switch15, switch15_raw))

    # switch16 | Offset: 38, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch16_raw = (data_raw >> 38) & 0x3
    switch16 = lookup_OFF_ON(switch16_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch16', 'Switch16', "", '', switch16, switch16_raw))

    # switch17 | Offset: 40, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch17_raw = (data_raw >> 40) & 0x3
    switch17 = lookup_OFF_ON(switch17_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch17', 'Switch17', "", '', switch17, switch17_raw))

    # switch18 | Offset: 42, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch18_raw = (data_raw >> 42) & 0x3
    switch18 = lookup_OFF_ON(switch18_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch18', 'Switch18', "", '', switch18, switch18_raw))

    # switch19 | Offset: 44, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch19_raw = (data_raw >> 44) & 0x3
    switch19 = lookup_OFF_ON(switch19_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch19', 'Switch19', "", '', switch19, switch19_raw))

    # switch20 | Offset: 46, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch20_raw = (data_raw >> 46) & 0x3
    switch20 = lookup_OFF_ON(switch20_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch20', 'Switch20', "", '', switch20, switch20_raw))

    # switch21 | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch21_raw = (data_raw >> 48) & 0x3
    switch21 = lookup_OFF_ON(switch21_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch21', 'Switch21', "", '', switch21, switch21_raw))

    # switch22 | Offset: 50, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch22_raw = (data_raw >> 50) & 0x3
    switch22 = lookup_OFF_ON(switch22_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch22', 'Switch22', "", '', switch22, switch22_raw))

    # switch23 | Offset: 52, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch23_raw = (data_raw >> 52) & 0x3
    switch23 = lookup_OFF_ON(switch23_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch23', 'Switch23', "", '', switch23, switch23_raw))

    # switch24 | Offset: 54, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch24_raw = (data_raw >> 54) & 0x3
    switch24 = lookup_OFF_ON(switch24_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch24', 'Switch24', "", '', switch24, switch24_raw))

    # switch25 | Offset: 56, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch25_raw = (data_raw >> 56) & 0x3
    switch25 = lookup_OFF_ON(switch25_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch25', 'Switch25', "", '', switch25, switch25_raw))

    # switch26 | Offset: 58, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch26_raw = (data_raw >> 58) & 0x3
    switch26 = lookup_OFF_ON(switch26_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch26', 'Switch26', "", '', switch26, switch26_raw))

    # switch27 | Offset: 60, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch27_raw = (data_raw >> 60) & 0x3
    switch27 = lookup_OFF_ON(switch27_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch27', 'Switch27', "", '', switch27, switch27_raw))

    # switch28 | Offset: 62, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch28_raw = (data_raw >> 62) & 0x3
    switch28 = lookup_OFF_ON(switch28_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch28', 'Switch28', "", '', switch28, switch28_raw))

    return nmea2000Message

def encode_pgn_127502(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127502."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # switch1 | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch1'")
    data_raw |= (field_value & 0x3) << 8
    # switch2 | Offset: 10, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch2'")
    data_raw |= (field_value & 0x3) << 10
    # switch3 | Offset: 12, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch3'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch3'")
    data_raw |= (field_value & 0x3) << 12
    # switch4 | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch4'")
    data_raw |= (field_value & 0x3) << 14
    # switch5 | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch5'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch5'")
    data_raw |= (field_value & 0x3) << 16
    # switch6 | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch6'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch6'")
    data_raw |= (field_value & 0x3) << 18
    # switch7 | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch7'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch7'")
    data_raw |= (field_value & 0x3) << 20
    # switch8 | Offset: 22, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch8'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch8'")
    data_raw |= (field_value & 0x3) << 22
    # switch9 | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch9'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch9'")
    data_raw |= (field_value & 0x3) << 24
    # switch10 | Offset: 26, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch10'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch10'")
    data_raw |= (field_value & 0x3) << 26
    # switch11 | Offset: 28, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch11'")
    data_raw |= (field_value & 0x3) << 28
    # switch12 | Offset: 30, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch12'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch12'")
    data_raw |= (field_value & 0x3) << 30
    # switch13 | Offset: 32, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch13'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch13'")
    data_raw |= (field_value & 0x3) << 32
    # switch14 | Offset: 34, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch14'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch14'")
    data_raw |= (field_value & 0x3) << 34
    # switch15 | Offset: 36, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch15'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch15'")
    data_raw |= (field_value & 0x3) << 36
    # switch16 | Offset: 38, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch16'")
    data_raw |= (field_value & 0x3) << 38
    # switch17 | Offset: 40, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch17'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch17'")
    data_raw |= (field_value & 0x3) << 40
    # switch18 | Offset: 42, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch18'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch18'")
    data_raw |= (field_value & 0x3) << 42
    # switch19 | Offset: 44, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch19'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch19'")
    data_raw |= (field_value & 0x3) << 44
    # switch20 | Offset: 46, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch20'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch20'")
    data_raw |= (field_value & 0x3) << 46
    # switch21 | Offset: 48, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch21'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch21'")
    data_raw |= (field_value & 0x3) << 48
    # switch22 | Offset: 50, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch22'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch22'")
    data_raw |= (field_value & 0x3) << 50
    # switch23 | Offset: 52, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch23'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch23'")
    data_raw |= (field_value & 0x3) << 52
    # switch24 | Offset: 54, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch24'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch24'")
    data_raw |= (field_value & 0x3) << 54
    # switch25 | Offset: 56, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch25'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch25'")
    data_raw |= (field_value & 0x3) << 56
    # switch26 | Offset: 58, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch26'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch26'")
    data_raw |= (field_value & 0x3) << 58
    # switch27 | Offset: 60, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch27'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch27'")
    data_raw |= (field_value & 0x3) << 60
    # switch28 | Offset: 62, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch28'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch28'")
    data_raw |= (field_value & 0x3) << 62
    return data_raw


def is_fast_pgn_127503() -> bool:
    """Return True if PGN 127503 is a fast PGN."""
    return True
def decode_pgn_127503(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127503."""
    nmea2000Message = NMEA2000Message(127503, 'acInputStatus', 'AC Input Status')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # number_of_lines | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_lines_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    number_of_lines = number_of_lines_raw * 1 if number_of_lines_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_lines', 'Number of Lines', "", '', number_of_lines, number_of_lines_raw))

    # line | Offset: 16, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    line_raw = decode_number((data_raw >> 16) & 0x3, 2)
    line = line_raw * 1 if line_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line', 'Line', "", '', line, line_raw))

    # acceptability | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    acceptability_raw = (data_raw >> 18) & 0x3
    acceptability = lookup_ACCEPTABILITY(acceptability_raw)
    nmea2000Message.fields.append(NMEA2000Field('acceptability', 'Acceptability', "", '', acceptability, acceptability_raw))

    # reserved_20 | Offset: 20, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_20_raw = (data_raw >> 20) & 0xF
    reserved_20 = reserved_20_raw * 1 if reserved_20_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_20', 'Reserved', "", '', reserved_20, reserved_20_raw))

    # voltage | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    voltage_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    voltage = voltage_raw * 0.01 if voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('voltage', 'Voltage', "", 'V', voltage, voltage_raw))

    # current | Offset: 40, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    current_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    current = current_raw * 0.1 if current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('current', 'Current', "", 'A', current, current_raw))

    # frequency | Offset: 56, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    frequency_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    frequency = frequency_raw * 0.01 if frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('frequency', 'Frequency', "", 'Hz', frequency, frequency_raw))

    # breaker_size | Offset: 72, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    breaker_size_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    breaker_size = breaker_size_raw * 0.1 if breaker_size_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('breaker_size', 'Breaker Size', "", 'A', breaker_size, breaker_size_raw))

    # real_power | Offset: 88, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    real_power_raw = decode_number((data_raw >> 88) & 0xFFFFFFFF, 32)
    real_power = real_power_raw * 1 if real_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('real_power', 'Real Power', "", 'W', real_power, real_power_raw))

    # reactive_power | Offset: 120, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    reactive_power_raw = decode_number((data_raw >> 120) & 0xFFFFFFFF, 32)
    reactive_power = reactive_power_raw * 1 if reactive_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reactive_power', 'Reactive Power', "", 'VAR', reactive_power, reactive_power_raw))

    # power_factor | Offset: 152, Length: 8, Resolution: 0.01, Field Type: NUMBER, Match: 
    power_factor_raw = decode_number((data_raw >> 152) & 0xFF, 8)
    power_factor = power_factor_raw * 0.01 if power_factor_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power_factor', 'Power factor', "", 'Cos Phi', power_factor, power_factor_raw))

    return nmea2000Message

def encode_pgn_127503(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127503."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # number_of_lines | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_lines'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Lines'")
    data_raw |= (field_value & 0xFF) << 8
    # line | Offset: 16, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line'")
    data_raw |= (field_value & 0x3) << 16
    # acceptability | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ACCEPTABILITY(f.value) for f in nmea2000Message.fields if f.id == 'acceptability'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Acceptability'")
    data_raw |= (field_value & 0x3) << 18
    # reserved_20 | Offset: 20, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_20'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 20
    # voltage | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Voltage'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 24
    
    # current | Offset: 40, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Current'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 40
    
    # frequency | Offset: 56, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Frequency'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 56
    
    # breaker_size | Offset: 72, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'breaker_size'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Breaker Size'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 72
    
    # real_power | Offset: 88, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'real_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Real Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 88
    # reactive_power | Offset: 120, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reactive_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reactive Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 120
    # power_factor | Offset: 152, Length: 8, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power_factor'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power factor'")        
    data_raw |= (int(field_value / 0.01) & 0xFF) << 152
    
    return data_raw


def is_fast_pgn_127504() -> bool:
    """Return True if PGN 127504 is a fast PGN."""
    return True
def decode_pgn_127504(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127504."""
    nmea2000Message = NMEA2000Message(127504, 'acOutputStatus', 'AC Output Status')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # number_of_lines | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_lines_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    number_of_lines = number_of_lines_raw * 1 if number_of_lines_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_lines', 'Number of Lines', "", '', number_of_lines, number_of_lines_raw))

    # line | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    line_raw = (data_raw >> 16) & 0x3
    line = lookup_LINE(line_raw)
    nmea2000Message.fields.append(NMEA2000Field('line', 'Line', "", '', line, line_raw))

    # waveform | Offset: 18, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    waveform_raw = (data_raw >> 18) & 0x7
    waveform = lookup_WAVEFORM(waveform_raw)
    nmea2000Message.fields.append(NMEA2000Field('waveform', 'Waveform', "", '', waveform, waveform_raw))

    # reserved_21 | Offset: 21, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_21_raw = (data_raw >> 21) & 0x7
    reserved_21 = reserved_21_raw * 1 if reserved_21_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_21', 'Reserved', "", '', reserved_21, reserved_21_raw))

    # voltage | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    voltage_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    voltage = voltage_raw * 0.01 if voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('voltage', 'Voltage', "", 'V', voltage, voltage_raw))

    # current | Offset: 40, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    current_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    current = current_raw * 0.1 if current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('current', 'Current', "", 'A', current, current_raw))

    # frequency | Offset: 56, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    frequency_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    frequency = frequency_raw * 0.01 if frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('frequency', 'Frequency', "", 'Hz', frequency, frequency_raw))

    # breaker_size | Offset: 72, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    breaker_size_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    breaker_size = breaker_size_raw * 0.1 if breaker_size_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('breaker_size', 'Breaker Size', "", 'A', breaker_size, breaker_size_raw))

    # real_power | Offset: 88, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    real_power_raw = decode_number((data_raw >> 88) & 0xFFFFFFFF, 32)
    real_power = real_power_raw * 1 if real_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('real_power', 'Real Power', "", 'W', real_power, real_power_raw))

    # reactive_power | Offset: 120, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    reactive_power_raw = decode_number((data_raw >> 120) & 0xFFFFFFFF, 32)
    reactive_power = reactive_power_raw * 1 if reactive_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reactive_power', 'Reactive Power', "", 'VAR', reactive_power, reactive_power_raw))

    # power_factor | Offset: 152, Length: 8, Resolution: 0.01, Field Type: NUMBER, Match: 
    power_factor_raw = decode_number((data_raw >> 152) & 0xFF, 8)
    power_factor = power_factor_raw * 0.01 if power_factor_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power_factor', 'Power factor', "", 'Cos Phi', power_factor, power_factor_raw))

    return nmea2000Message

def encode_pgn_127504(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127504."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # number_of_lines | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_lines'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Lines'")
    data_raw |= (field_value & 0xFF) << 8
    # line | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_LINE(f.value) for f in nmea2000Message.fields if f.id == 'line'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line'")
    data_raw |= (field_value & 0x3) << 16
    # waveform | Offset: 18, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_WAVEFORM(f.value) for f in nmea2000Message.fields if f.id == 'waveform'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Waveform'")
    data_raw |= (field_value & 0x7) << 18
    # reserved_21 | Offset: 21, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_21'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 21
    # voltage | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Voltage'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 24
    
    # current | Offset: 40, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Current'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 40
    
    # frequency | Offset: 56, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Frequency'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 56
    
    # breaker_size | Offset: 72, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'breaker_size'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Breaker Size'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 72
    
    # real_power | Offset: 88, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'real_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Real Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 88
    # reactive_power | Offset: 120, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reactive_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reactive Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 120
    # power_factor | Offset: 152, Length: 8, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power_factor'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power factor'")        
    data_raw |= (int(field_value / 0.01) & 0xFF) << 152
    
    return data_raw


def is_fast_pgn_127505() -> bool:
    """Return True if PGN 127505 is a fast PGN."""
    return False
def decode_pgn_127505(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127505."""
    nmea2000Message = NMEA2000Message(127505, 'fluidLevel', 'Fluid Level')
    # instance | Offset: 0, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xF, 4)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # type | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    type_raw = (data_raw >> 4) & 0xF
    type = lookup_TANK_TYPE(type_raw)
    nmea2000Message.fields.append(NMEA2000Field('type', 'Type', "", '', type, type_raw))

    # level | Offset: 8, Length: 16, Resolution: 0.004, Field Type: NUMBER, Match: 
    level_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    if level_raw is not None and level_raw & (1 << (16 - 1)):
        level_raw -= (1 << 16)
    level = level_raw * 0.004 if level_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('level', 'Level', "", '%', level, level_raw))

    # capacity | Offset: 24, Length: 32, Resolution: 0.1, Field Type: NUMBER, Match: 
    capacity_raw = decode_number((data_raw >> 24) & 0xFFFFFFFF, 32)
    capacity = capacity_raw * 0.1 if capacity_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('capacity', 'Capacity', "", 'L', capacity, capacity_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_127505(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127505."""
    data_raw = 0
    # instance | Offset: 0, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xF) << 0
    # type | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TANK_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Type'")
    data_raw |= (field_value & 0xF) << 4
    # level | Offset: 8, Length: 16, Resolution: 0.004, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'level'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Level'")        
    data_raw |= (int(field_value / 0.004) & 0xFFFF) << 8
    
    # capacity | Offset: 24, Length: 32, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'capacity'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Capacity'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFFFFFF) << 24
    
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_127506() -> bool:
    """Return True if PGN 127506 is a fast PGN."""
    return True
def decode_pgn_127506(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127506."""
    nmea2000Message = NMEA2000Message(127506, 'dcDetailedStatus', 'DC Detailed Status')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # dc_type | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    dc_type_raw = (data_raw >> 16) & 0xFF
    dc_type = lookup_DC_SOURCE(dc_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('dc_type', 'DC Type', "", '', dc_type, dc_type_raw))

    # state_of_charge | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    state_of_charge_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    state_of_charge = state_of_charge_raw * 1 if state_of_charge_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('state_of_charge', 'State of Charge', "", '', state_of_charge, state_of_charge_raw))

    # state_of_health | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    state_of_health_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    state_of_health = state_of_health_raw * 1 if state_of_health_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('state_of_health', 'State of Health', "", '', state_of_health, state_of_health_raw))

    # time_remaining | Offset: 40, Length: 16, Resolution: 60, Field Type: TIME, Match: 
    time_remaining_raw = (data_raw >> 40) & 0xFFFF
    time_remaining = decode_time(time_remaining_raw * 60)
    nmea2000Message.fields.append(NMEA2000Field('time_remaining', 'Time Remaining', "Time remaining at current rate of discharge", 's', time_remaining, time_remaining_raw))

    # ripple_voltage | Offset: 56, Length: 16, Resolution: 0.001, Field Type: NUMBER, Match: 
    ripple_voltage_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    ripple_voltage = ripple_voltage_raw * 0.001 if ripple_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ripple_voltage', 'Ripple Voltage', "", 'V', ripple_voltage, ripple_voltage_raw))

    # remaining_capacity | Offset: 72, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    remaining_capacity_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    remaining_capacity = remaining_capacity_raw * 1 if remaining_capacity_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('remaining_capacity', 'Remaining capacity', "", 'Ah', remaining_capacity, remaining_capacity_raw))

    return nmea2000Message

def encode_pgn_127506(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127506."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 8
    # dc_type | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DC_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'dc_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DC Type'")
    data_raw |= (field_value & 0xFF) << 16
    # state_of_charge | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'state_of_charge'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'State of Charge'")
    data_raw |= (field_value & 0xFF) << 24
    # state_of_health | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'state_of_health'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'State of Health'")
    data_raw |= (field_value & 0xFF) << 32
    # time_remaining | Offset: 40, Length: 16, Resolution: 60, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'time_remaining'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time Remaining'")        
    data_raw |= (int(field_value / 60) & 0xFFFF) << 40
    
    # ripple_voltage | Offset: 56, Length: 16, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ripple_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Ripple Voltage'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 56
    
    # remaining_capacity | Offset: 72, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'remaining_capacity'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Remaining capacity'")
    data_raw |= (field_value & 0xFFFF) << 72
    return data_raw


def is_fast_pgn_127507() -> bool:
    """Return True if PGN 127507 is a fast PGN."""
    return True
def decode_pgn_127507(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127507."""
    nmea2000Message = NMEA2000Message(127507, 'chargerStatus', 'Charger Status')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # battery_instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    battery_instance_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    battery_instance = battery_instance_raw * 1 if battery_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('battery_instance', 'Battery Instance', "", '', battery_instance, battery_instance_raw))

    # operating_state | Offset: 16, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    operating_state_raw = (data_raw >> 16) & 0xF
    operating_state = lookup_CHARGER_STATE(operating_state_raw)
    nmea2000Message.fields.append(NMEA2000Field('operating_state', 'Operating State', "", '', operating_state, operating_state_raw))

    # charge_mode | Offset: 20, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    charge_mode_raw = (data_raw >> 20) & 0xF
    charge_mode = lookup_CHARGER_MODE(charge_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('charge_mode', 'Charge Mode', "", '', charge_mode, charge_mode_raw))

    # enabled | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    enabled_raw = (data_raw >> 24) & 0x3
    enabled = lookup_OFF_ON(enabled_raw)
    nmea2000Message.fields.append(NMEA2000Field('enabled', 'Enabled', "", '', enabled, enabled_raw))

    # equalization_pending | Offset: 26, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    equalization_pending_raw = (data_raw >> 26) & 0x3
    equalization_pending = lookup_OFF_ON(equalization_pending_raw)
    nmea2000Message.fields.append(NMEA2000Field('equalization_pending', 'Equalization Pending', "", '', equalization_pending, equalization_pending_raw))

    # reserved_28 | Offset: 28, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_28_raw = (data_raw >> 28) & 0xF
    reserved_28 = reserved_28_raw * 1 if reserved_28_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_28', 'Reserved', "", '', reserved_28, reserved_28_raw))

    # equalization_time_remaining | Offset: 32, Length: 16, Resolution: 60, Field Type: TIME, Match: 
    equalization_time_remaining_raw = (data_raw >> 32) & 0xFFFF
    equalization_time_remaining = decode_time(equalization_time_remaining_raw * 60)
    nmea2000Message.fields.append(NMEA2000Field('equalization_time_remaining', 'Equalization Time Remaining', "", 's', equalization_time_remaining, equalization_time_remaining_raw))

    return nmea2000Message

def encode_pgn_127507(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127507."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # battery_instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'battery_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Battery Instance'")
    data_raw |= (field_value & 0xFF) << 8
    # operating_state | Offset: 16, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_CHARGER_STATE(f.value) for f in nmea2000Message.fields if f.id == 'operating_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Operating State'")
    data_raw |= (field_value & 0xF) << 16
    # charge_mode | Offset: 20, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_CHARGER_MODE(f.value) for f in nmea2000Message.fields if f.id == 'charge_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Charge Mode'")
    data_raw |= (field_value & 0xF) << 20
    # enabled | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'enabled'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Enabled'")
    data_raw |= (field_value & 0x3) << 24
    # equalization_pending | Offset: 26, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'equalization_pending'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Equalization Pending'")
    data_raw |= (field_value & 0x3) << 26
    # reserved_28 | Offset: 28, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_28'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 28
    # equalization_time_remaining | Offset: 32, Length: 16, Resolution: 60, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'equalization_time_remaining'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Equalization Time Remaining'")        
    data_raw |= (int(field_value / 60) & 0xFFFF) << 32
    
    return data_raw


def is_fast_pgn_127508() -> bool:
    """Return True if PGN 127508 is a fast PGN."""
    return False
def decode_pgn_127508(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127508."""
    nmea2000Message = NMEA2000Message(127508, 'batteryStatus', 'Battery Status')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # voltage | Offset: 8, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    voltage_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    if voltage_raw is not None and voltage_raw & (1 << (16 - 1)):
        voltage_raw -= (1 << 16)
    voltage = voltage_raw * 0.01 if voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('voltage', 'Voltage', "", 'V', voltage, voltage_raw))

    # current | Offset: 24, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    current_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    if current_raw is not None and current_raw & (1 << (16 - 1)):
        current_raw -= (1 << 16)
    current = current_raw * 0.1 if current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('current', 'Current', "", 'A', current, current_raw))

    # temperature | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    temperature_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    temperature = temperature_raw * 0.01 if temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('temperature', 'Temperature', "", 'K', temperature, temperature_raw))

    # sid | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    return nmea2000Message

def encode_pgn_127508(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127508."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # voltage | Offset: 8, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Voltage'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 8
    
    # current | Offset: 24, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Current'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 24
    
    # temperature | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 40
    
    # sid | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_127509() -> bool:
    """Return True if PGN 127509 is a fast PGN."""
    return True
def decode_pgn_127509(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127509."""
    nmea2000Message = NMEA2000Message(127509, 'inverterStatus', 'Inverter Status')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # ac_instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    ac_instance_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    ac_instance = ac_instance_raw * 1 if ac_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_instance', 'AC Instance', "", '', ac_instance, ac_instance_raw))

    # dc_instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    dc_instance_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    dc_instance = dc_instance_raw * 1 if dc_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dc_instance', 'DC Instance', "", '', dc_instance, dc_instance_raw))

    # operating_state | Offset: 24, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    operating_state_raw = (data_raw >> 24) & 0xF
    operating_state = lookup_INVERTER_STATE(operating_state_raw)
    nmea2000Message.fields.append(NMEA2000Field('operating_state', 'Operating State', "", '', operating_state, operating_state_raw))

    # inverter_enable | Offset: 28, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    inverter_enable_raw = (data_raw >> 28) & 0x3
    inverter_enable = lookup_OFF_ON(inverter_enable_raw)
    nmea2000Message.fields.append(NMEA2000Field('inverter_enable', 'Inverter Enable', "", '', inverter_enable, inverter_enable_raw))

    # reserved_30 | Offset: 30, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_30_raw = (data_raw >> 30) & 0x3
    reserved_30 = reserved_30_raw * 1 if reserved_30_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_30', 'Reserved', "", '', reserved_30, reserved_30_raw))

    return nmea2000Message

def encode_pgn_127509(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127509."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # ac_instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Instance'")
    data_raw |= (field_value & 0xFF) << 8
    # dc_instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dc_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DC Instance'")
    data_raw |= (field_value & 0xFF) << 16
    # operating_state | Offset: 24, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INVERTER_STATE(f.value) for f in nmea2000Message.fields if f.id == 'operating_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Operating State'")
    data_raw |= (field_value & 0xF) << 24
    # inverter_enable | Offset: 28, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'inverter_enable'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Inverter Enable'")
    data_raw |= (field_value & 0x3) << 28
    # reserved_30 | Offset: 30, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_30'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 30
    return data_raw


def is_fast_pgn_127510() -> bool:
    """Return True if PGN 127510 is a fast PGN."""
    return True
def decode_pgn_127510(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127510."""
    nmea2000Message = NMEA2000Message(127510, 'chargerConfigurationStatus', 'Charger Configuration Status')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # battery_instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    battery_instance_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    battery_instance = battery_instance_raw * 1 if battery_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('battery_instance', 'Battery Instance', "", '', battery_instance, battery_instance_raw))

    # charger_enable_disable | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    charger_enable_disable_raw = (data_raw >> 16) & 0x3
    charger_enable_disable = lookup_OFF_ON(charger_enable_disable_raw)
    nmea2000Message.fields.append(NMEA2000Field('charger_enable_disable', 'Charger Enable/Disable', "", '', charger_enable_disable, charger_enable_disable_raw))

    # reserved_18 | Offset: 18, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_18_raw = (data_raw >> 18) & 0x3F
    reserved_18 = reserved_18_raw * 1 if reserved_18_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_18', 'Reserved', "", '', reserved_18, reserved_18_raw))

    # charge_current_limit | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    charge_current_limit_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    charge_current_limit = charge_current_limit_raw * 1 if charge_current_limit_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('charge_current_limit', 'Charge Current Limit', "", '%', charge_current_limit, charge_current_limit_raw))

    # charging_algorithm | Offset: 32, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    charging_algorithm_raw = (data_raw >> 32) & 0xF
    charging_algorithm = lookup_CHARGING_ALGORITHM(charging_algorithm_raw)
    nmea2000Message.fields.append(NMEA2000Field('charging_algorithm', 'Charging Algorithm', "", '', charging_algorithm, charging_algorithm_raw))

    # charger_mode | Offset: 36, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    charger_mode_raw = (data_raw >> 36) & 0xF
    charger_mode = lookup_CHARGER_MODE(charger_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('charger_mode', 'Charger Mode', "", '', charger_mode, charger_mode_raw))

    # estimated_temperature | Offset: 40, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    estimated_temperature_raw = (data_raw >> 40) & 0xF
    estimated_temperature = lookup_DEVICE_TEMP_STATE(estimated_temperature_raw)
    nmea2000Message.fields.append(NMEA2000Field('estimated_temperature', 'Estimated Temperature', "If there is no battery temperature sensor the charger will use this field to steer the charging algorithm", '', estimated_temperature, estimated_temperature_raw))

    # equalize_one_time_enable_disable | Offset: 44, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    equalize_one_time_enable_disable_raw = (data_raw >> 44) & 0x3
    equalize_one_time_enable_disable = lookup_OFF_ON(equalize_one_time_enable_disable_raw)
    nmea2000Message.fields.append(NMEA2000Field('equalize_one_time_enable_disable', 'Equalize One Time Enable/Disable', "", '', equalize_one_time_enable_disable, equalize_one_time_enable_disable_raw))

    # over_charge_enable_disable | Offset: 46, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    over_charge_enable_disable_raw = (data_raw >> 46) & 0x3
    over_charge_enable_disable = lookup_OFF_ON(over_charge_enable_disable_raw)
    nmea2000Message.fields.append(NMEA2000Field('over_charge_enable_disable', 'Over Charge Enable/Disable', "", '', over_charge_enable_disable, over_charge_enable_disable_raw))

    # equalize_time | Offset: 48, Length: 16, Resolution: 60, Field Type: TIME, Match: 
    equalize_time_raw = (data_raw >> 48) & 0xFFFF
    equalize_time = decode_time(equalize_time_raw * 60)
    nmea2000Message.fields.append(NMEA2000Field('equalize_time', 'Equalize Time', "", 's', equalize_time, equalize_time_raw))

    return nmea2000Message

def encode_pgn_127510(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127510."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # battery_instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'battery_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Battery Instance'")
    data_raw |= (field_value & 0xFF) << 8
    # charger_enable_disable | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'charger_enable_disable'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Charger Enable/Disable'")
    data_raw |= (field_value & 0x3) << 16
    # reserved_18 | Offset: 18, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_18'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 18
    # charge_current_limit | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'charge_current_limit'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Charge Current Limit'")
    data_raw |= (field_value & 0xFF) << 24
    # charging_algorithm | Offset: 32, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_CHARGING_ALGORITHM(f.value) for f in nmea2000Message.fields if f.id == 'charging_algorithm'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Charging Algorithm'")
    data_raw |= (field_value & 0xF) << 32
    # charger_mode | Offset: 36, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_CHARGER_MODE(f.value) for f in nmea2000Message.fields if f.id == 'charger_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Charger Mode'")
    data_raw |= (field_value & 0xF) << 36
    # estimated_temperature | Offset: 40, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DEVICE_TEMP_STATE(f.value) for f in nmea2000Message.fields if f.id == 'estimated_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Estimated Temperature'")
    data_raw |= (field_value & 0xF) << 40
    # equalize_one_time_enable_disable | Offset: 44, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'equalize_one_time_enable_disable'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Equalize One Time Enable/Disable'")
    data_raw |= (field_value & 0x3) << 44
    # over_charge_enable_disable | Offset: 46, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'over_charge_enable_disable'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Over Charge Enable/Disable'")
    data_raw |= (field_value & 0x3) << 46
    # equalize_time | Offset: 48, Length: 16, Resolution: 60, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'equalize_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Equalize Time'")        
    data_raw |= (int(field_value / 60) & 0xFFFF) << 48
    
    return data_raw


def is_fast_pgn_127511() -> bool:
    """Return True if PGN 127511 is a fast PGN."""
    return False
def decode_pgn_127511(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127511."""
    nmea2000Message = NMEA2000Message(127511, 'inverterConfigurationStatus', 'Inverter Configuration Status')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # ac_instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    ac_instance_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    ac_instance = ac_instance_raw * 1 if ac_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_instance', 'AC Instance', "", '', ac_instance, ac_instance_raw))

    # dc_instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    dc_instance_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    dc_instance = dc_instance_raw * 1 if dc_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dc_instance', 'DC Instance', "", '', dc_instance, dc_instance_raw))

    # inverter_enable_disable | Offset: 24, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    inverter_enable_disable_raw = decode_number((data_raw >> 24) & 0x3, 2)
    inverter_enable_disable = inverter_enable_disable_raw * 1 if inverter_enable_disable_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('inverter_enable_disable', 'Inverter Enable/Disable', "", '', inverter_enable_disable, inverter_enable_disable_raw))

    # reserved_26 | Offset: 26, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_26_raw = (data_raw >> 26) & 0x3F
    reserved_26 = reserved_26_raw * 1 if reserved_26_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_26', 'Reserved', "", '', reserved_26, reserved_26_raw))

    # inverter_mode | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    inverter_mode_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    inverter_mode = inverter_mode_raw * 1 if inverter_mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('inverter_mode', 'Inverter Mode', "", '', inverter_mode, inverter_mode_raw))

    # load_sense_enable_disable | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    load_sense_enable_disable_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    load_sense_enable_disable = load_sense_enable_disable_raw * 1 if load_sense_enable_disable_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('load_sense_enable_disable', 'Load Sense Enable/Disable', "", '', load_sense_enable_disable, load_sense_enable_disable_raw))

    # load_sense_power_threshold | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    load_sense_power_threshold_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    load_sense_power_threshold = load_sense_power_threshold_raw * 1 if load_sense_power_threshold_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('load_sense_power_threshold', 'Load Sense Power Threshold', "", '', load_sense_power_threshold, load_sense_power_threshold_raw))

    # load_sense_interval | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    load_sense_interval_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    load_sense_interval = load_sense_interval_raw * 1 if load_sense_interval_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('load_sense_interval', 'Load Sense Interval', "", '', load_sense_interval, load_sense_interval_raw))

    return nmea2000Message

def encode_pgn_127511(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127511."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # ac_instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC Instance'")
    data_raw |= (field_value & 0xFF) << 8
    # dc_instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dc_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DC Instance'")
    data_raw |= (field_value & 0xFF) << 16
    # inverter_enable_disable | Offset: 24, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'inverter_enable_disable'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Inverter Enable/Disable'")
    data_raw |= (field_value & 0x3) << 24
    # reserved_26 | Offset: 26, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_26'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 26
    # inverter_mode | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'inverter_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Inverter Mode'")
    data_raw |= (field_value & 0xFF) << 32
    # load_sense_enable_disable | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'load_sense_enable_disable'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Load Sense Enable/Disable'")
    data_raw |= (field_value & 0xFF) << 40
    # load_sense_power_threshold | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'load_sense_power_threshold'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Load Sense Power Threshold'")
    data_raw |= (field_value & 0xFF) << 48
    # load_sense_interval | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'load_sense_interval'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Load Sense Interval'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_127512() -> bool:
    """Return True if PGN 127512 is a fast PGN."""
    return False
def decode_pgn_127512(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127512."""
    nmea2000Message = NMEA2000Message(127512, 'agsConfigurationStatus', 'AGS Configuration Status')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # generator_instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    generator_instance_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    generator_instance = generator_instance_raw * 1 if generator_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('generator_instance', 'Generator Instance', "", '', generator_instance, generator_instance_raw))

    # ags_mode | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    ags_mode_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    ags_mode = ags_mode_raw * 1 if ags_mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ags_mode', 'AGS Mode', "", '', ags_mode, ags_mode_raw))

    # reserved_24 | Offset: 24, Length: 40, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_24_raw = (data_raw >> 24) & 0xFFFFFFFFFF
    reserved_24 = reserved_24_raw * 1 if reserved_24_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_24', 'Reserved', "", '', reserved_24, reserved_24_raw))

    return nmea2000Message

def encode_pgn_127512(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127512."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # generator_instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'generator_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Generator Instance'")
    data_raw |= (field_value & 0xFF) << 8
    # ags_mode | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ags_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AGS Mode'")
    data_raw |= (field_value & 0xFF) << 16
    # reserved_24 | Offset: 24, Length: 40, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_24'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFFFF) << 24
    return data_raw


def is_fast_pgn_127513() -> bool:
    """Return True if PGN 127513 is a fast PGN."""
    return True
def decode_pgn_127513(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127513."""
    nmea2000Message = NMEA2000Message(127513, 'batteryConfigurationStatus', 'Battery Configuration Status')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # battery_type | Offset: 8, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    battery_type_raw = (data_raw >> 8) & 0xF
    battery_type = lookup_BATTERY_TYPE(battery_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('battery_type', 'Battery Type', "", '', battery_type, battery_type_raw))

    # supports_equalization | Offset: 12, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    supports_equalization_raw = (data_raw >> 12) & 0x3
    supports_equalization = lookup_YES_NO(supports_equalization_raw)
    nmea2000Message.fields.append(NMEA2000Field('supports_equalization', 'Supports Equalization', "", '', supports_equalization, supports_equalization_raw))

    # reserved_14 | Offset: 14, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_14_raw = (data_raw >> 14) & 0x3
    reserved_14 = reserved_14_raw * 1 if reserved_14_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_14', 'Reserved', "", '', reserved_14, reserved_14_raw))

    # nominal_voltage | Offset: 16, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    nominal_voltage_raw = (data_raw >> 16) & 0xF
    nominal_voltage = lookup_BATTERY_VOLTAGE(nominal_voltage_raw)
    nmea2000Message.fields.append(NMEA2000Field('nominal_voltage', 'Nominal Voltage', "", '', nominal_voltage, nominal_voltage_raw))

    # chemistry | Offset: 20, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    chemistry_raw = (data_raw >> 20) & 0xF
    chemistry = lookup_BATTERY_CHEMISTRY(chemistry_raw)
    nmea2000Message.fields.append(NMEA2000Field('chemistry', 'Chemistry', "", '', chemistry, chemistry_raw))

    # capacity | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    capacity_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    capacity = capacity_raw * 1 if capacity_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('capacity', 'Capacity', "", 'Ah', capacity, capacity_raw))

    # temperature_coefficient | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    temperature_coefficient_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    if temperature_coefficient_raw is not None and temperature_coefficient_raw & (1 << (8 - 1)):
        temperature_coefficient_raw -= (1 << 8)
    temperature_coefficient = temperature_coefficient_raw * 1 if temperature_coefficient_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('temperature_coefficient', 'Temperature Coefficient', "", '%', temperature_coefficient, temperature_coefficient_raw))

    # peukert_exponent | Offset: 48, Length: 8, Resolution: 0.002, Field Type: NUMBER, Match: 
    peukert_exponent_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    peukert_exponent = peukert_exponent_raw * 0.002 if peukert_exponent_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('peukert_exponent', 'Peukert Exponent', "", '', peukert_exponent, peukert_exponent_raw))

    # charge_efficiency_factor | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    charge_efficiency_factor_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    if charge_efficiency_factor_raw is not None and charge_efficiency_factor_raw & (1 << (8 - 1)):
        charge_efficiency_factor_raw -= (1 << 8)
    charge_efficiency_factor = charge_efficiency_factor_raw * 1 if charge_efficiency_factor_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('charge_efficiency_factor', 'Charge Efficiency Factor', "", '%', charge_efficiency_factor, charge_efficiency_factor_raw))

    return nmea2000Message

def encode_pgn_127513(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127513."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # battery_type | Offset: 8, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_BATTERY_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'battery_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Battery Type'")
    data_raw |= (field_value & 0xF) << 8
    # supports_equalization | Offset: 12, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'supports_equalization'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Supports Equalization'")
    data_raw |= (field_value & 0x3) << 12
    # reserved_14 | Offset: 14, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_14'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 14
    # nominal_voltage | Offset: 16, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_BATTERY_VOLTAGE(f.value) for f in nmea2000Message.fields if f.id == 'nominal_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Nominal Voltage'")
    data_raw |= (field_value & 0xF) << 16
    # chemistry | Offset: 20, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_BATTERY_CHEMISTRY(f.value) for f in nmea2000Message.fields if f.id == 'chemistry'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Chemistry'")
    data_raw |= (field_value & 0xF) << 20
    # capacity | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'capacity'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Capacity'")
    data_raw |= (field_value & 0xFFFF) << 24
    # temperature_coefficient | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'temperature_coefficient'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temperature Coefficient'")
    data_raw |= (field_value & 0xFF) << 40
    # peukert_exponent | Offset: 48, Length: 8, Resolution: 0.002, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'peukert_exponent'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Peukert Exponent'")        
    data_raw |= (int(field_value / 0.002) & 0xFF) << 48
    
    # charge_efficiency_factor | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'charge_efficiency_factor'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Charge Efficiency Factor'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_127514() -> bool:
    """Return True if PGN 127514 is a fast PGN."""
    return False
def decode_pgn_127514(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127514."""
    nmea2000Message = NMEA2000Message(127514, 'agsStatus', 'AGS Status')
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # generator_instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    generator_instance_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    generator_instance = generator_instance_raw * 1 if generator_instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('generator_instance', 'Generator Instance', "", '', generator_instance, generator_instance_raw))

    # ags_operating_state | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    ags_operating_state_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    ags_operating_state = ags_operating_state_raw * 1 if ags_operating_state_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ags_operating_state', 'AGS Operating State', "", '', ags_operating_state, ags_operating_state_raw))

    # generator_state | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    generator_state_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    generator_state = generator_state_raw * 1 if generator_state_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('generator_state', 'Generator State', "", '', generator_state, generator_state_raw))

    # generator_on_reason | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    generator_on_reason_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    generator_on_reason = generator_on_reason_raw * 1 if generator_on_reason_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('generator_on_reason', 'Generator On Reason', "", '', generator_on_reason, generator_on_reason_raw))

    # generator_off_reason | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    generator_off_reason_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    generator_off_reason = generator_off_reason_raw * 1 if generator_off_reason_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('generator_off_reason', 'Generator Off Reason', "", '', generator_off_reason, generator_off_reason_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_127514(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127514."""
    data_raw = 0
    # instance | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 0
    # generator_instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'generator_instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Generator Instance'")
    data_raw |= (field_value & 0xFF) << 8
    # ags_operating_state | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ags_operating_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AGS Operating State'")
    data_raw |= (field_value & 0xFF) << 16
    # generator_state | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'generator_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Generator State'")
    data_raw |= (field_value & 0xFF) << 24
    # generator_on_reason | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'generator_on_reason'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Generator On Reason'")
    data_raw |= (field_value & 0xFF) << 32
    # generator_off_reason | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'generator_off_reason'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Generator Off Reason'")
    data_raw |= (field_value & 0xFF) << 40
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_127744() -> bool:
    """Return True if PGN 127744 is a fast PGN."""
    return False
def decode_pgn_127744(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127744."""
    nmea2000Message = NMEA2000Message(127744, 'acPowerCurrentPhaseA', 'AC Power / Current - Phase A')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # connection_number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    connection_number_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    connection_number = connection_number_raw * 1 if connection_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('connection_number', 'Connection Number', "", '', connection_number, connection_number_raw))

    # ac_rms_current | Offset: 16, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    ac_rms_current_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    ac_rms_current = ac_rms_current_raw * 0.1 if ac_rms_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_rms_current', 'AC RMS Current', "", 'A', ac_rms_current, ac_rms_current_raw))

    # power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    power_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if power_raw is not None and power_raw & (1 << (32 - 1)):
        power_raw -= (1 << 32)
    power = power_raw * 1 if power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power', 'Power', "", 'W', power, power_raw))

    return nmea2000Message

def encode_pgn_127744(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127744."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # connection_number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'connection_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Connection Number'")
    data_raw |= (field_value & 0xFF) << 8
    # ac_rms_current | Offset: 16, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_rms_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC RMS Current'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 16
    
    # power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_127745() -> bool:
    """Return True if PGN 127745 is a fast PGN."""
    return False
def decode_pgn_127745(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127745."""
    nmea2000Message = NMEA2000Message(127745, 'acPowerCurrentPhaseB', 'AC Power / Current - Phase B')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # connection_number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    connection_number_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    connection_number = connection_number_raw * 1 if connection_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('connection_number', 'Connection Number', "", '', connection_number, connection_number_raw))

    # ac_rms_current | Offset: 16, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    ac_rms_current_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    ac_rms_current = ac_rms_current_raw * 0.1 if ac_rms_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_rms_current', 'AC RMS Current', "", 'A', ac_rms_current, ac_rms_current_raw))

    # power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    power_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if power_raw is not None and power_raw & (1 << (32 - 1)):
        power_raw -= (1 << 32)
    power = power_raw * 1 if power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power', 'Power', "", 'W', power, power_raw))

    return nmea2000Message

def encode_pgn_127745(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127745."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # connection_number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'connection_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Connection Number'")
    data_raw |= (field_value & 0xFF) << 8
    # ac_rms_current | Offset: 16, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_rms_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC RMS Current'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 16
    
    # power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_127746() -> bool:
    """Return True if PGN 127746 is a fast PGN."""
    return False
def decode_pgn_127746(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127746."""
    nmea2000Message = NMEA2000Message(127746, 'acPowerCurrentPhaseC', 'AC Power / Current - Phase C')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # connection_number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    connection_number_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    connection_number = connection_number_raw * 1 if connection_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('connection_number', 'Connection Number', "", '', connection_number, connection_number_raw))

    # ac_rms_current | Offset: 16, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    ac_rms_current_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    ac_rms_current = ac_rms_current_raw * 0.1 if ac_rms_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ac_rms_current', 'AC RMS Current', "", 'A', ac_rms_current, ac_rms_current_raw))

    # power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    power_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if power_raw is not None and power_raw & (1 << (32 - 1)):
        power_raw -= (1 << 32)
    power = power_raw * 1 if power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power', 'Power', "", 'W', power, power_raw))

    return nmea2000Message

def encode_pgn_127746(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127746."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # connection_number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'connection_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Connection Number'")
    data_raw |= (field_value & 0xFF) << 8
    # ac_rms_current | Offset: 16, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ac_rms_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AC RMS Current'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 16
    
    # power | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_127750() -> bool:
    """Return True if PGN 127750 is a fast PGN."""
    return False
def decode_pgn_127750(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127750."""
    nmea2000Message = NMEA2000Message(127750, 'converterStatus', 'Converter Status')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    sid_raw = (data_raw >> 0) & 0xFF
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # connection_number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    connection_number_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    connection_number = connection_number_raw * 1 if connection_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('connection_number', 'Connection Number', "", '', connection_number, connection_number_raw))

    # operating_state | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    operating_state_raw = (data_raw >> 16) & 0xFF
    operating_state = lookup_CONVERTER_STATE(operating_state_raw)
    nmea2000Message.fields.append(NMEA2000Field('operating_state', 'Operating State', "", '', operating_state, operating_state_raw))

    # temperature_state | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    temperature_state_raw = (data_raw >> 24) & 0x3
    temperature_state = lookup_GOOD_WARNING_ERROR(temperature_state_raw)
    nmea2000Message.fields.append(NMEA2000Field('temperature_state', 'Temperature State', "", '', temperature_state, temperature_state_raw))

    # overload_state | Offset: 26, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    overload_state_raw = (data_raw >> 26) & 0x3
    overload_state = lookup_GOOD_WARNING_ERROR(overload_state_raw)
    nmea2000Message.fields.append(NMEA2000Field('overload_state', 'Overload State', "", '', overload_state, overload_state_raw))

    # low_dc_voltage_state | Offset: 28, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    low_dc_voltage_state_raw = (data_raw >> 28) & 0x3
    low_dc_voltage_state = lookup_GOOD_WARNING_ERROR(low_dc_voltage_state_raw)
    nmea2000Message.fields.append(NMEA2000Field('low_dc_voltage_state', 'Low DC Voltage State', "", '', low_dc_voltage_state, low_dc_voltage_state_raw))

    # ripple_state | Offset: 30, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    ripple_state_raw = (data_raw >> 30) & 0x3
    ripple_state = lookup_GOOD_WARNING_ERROR(ripple_state_raw)
    nmea2000Message.fields.append(NMEA2000Field('ripple_state', 'Ripple State', "", '', ripple_state, ripple_state_raw))

    # reserved_32 | Offset: 32, Length: 32, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_32_raw = (data_raw >> 32) & 0xFFFFFFFF
    reserved_32 = reserved_32_raw * 1 if reserved_32_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_32', 'Reserved', "", '', reserved_32, reserved_32_raw))

    return nmea2000Message

def encode_pgn_127750(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127750."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # connection_number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'connection_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Connection Number'")
    data_raw |= (field_value & 0xFF) << 8
    # operating_state | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_CONVERTER_STATE(f.value) for f in nmea2000Message.fields if f.id == 'operating_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Operating State'")
    data_raw |= (field_value & 0xFF) << 16
    # temperature_state | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GOOD_WARNING_ERROR(f.value) for f in nmea2000Message.fields if f.id == 'temperature_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temperature State'")
    data_raw |= (field_value & 0x3) << 24
    # overload_state | Offset: 26, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GOOD_WARNING_ERROR(f.value) for f in nmea2000Message.fields if f.id == 'overload_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Overload State'")
    data_raw |= (field_value & 0x3) << 26
    # low_dc_voltage_state | Offset: 28, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GOOD_WARNING_ERROR(f.value) for f in nmea2000Message.fields if f.id == 'low_dc_voltage_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Low DC Voltage State'")
    data_raw |= (field_value & 0x3) << 28
    # ripple_state | Offset: 30, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GOOD_WARNING_ERROR(f.value) for f in nmea2000Message.fields if f.id == 'ripple_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Ripple State'")
    data_raw |= (field_value & 0x3) << 30
    # reserved_32 | Offset: 32, Length: 32, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_32'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_127751() -> bool:
    """Return True if PGN 127751 is a fast PGN."""
    return False
def decode_pgn_127751(data_raw: int) -> NMEA2000Message:
    """Decode PGN 127751."""
    nmea2000Message = NMEA2000Message(127751, 'dcVoltageCurrent', 'DC Voltage/Current')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    sid_raw = (data_raw >> 0) & 0xFF
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # connection_number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    connection_number_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    connection_number = connection_number_raw * 1 if connection_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('connection_number', 'Connection Number', "", '', connection_number, connection_number_raw))

    # dc_voltage | Offset: 16, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    dc_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    dc_voltage = dc_voltage_raw * 0.1 if dc_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dc_voltage', 'DC Voltage', "", 'V', dc_voltage, dc_voltage_raw))

    # dc_current | Offset: 32, Length: 24, Resolution: 0.01, Field Type: NUMBER, Match: 
    dc_current_raw = decode_number((data_raw >> 32) & 0xFFFFFF, 24)
    if dc_current_raw is not None and dc_current_raw & (1 << (24 - 1)):
        dc_current_raw -= (1 << 24)
    dc_current = dc_current_raw * 0.01 if dc_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dc_current', 'DC Current', "", 'A', dc_current, dc_current_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_127751(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 127751."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # connection_number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'connection_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Connection Number'")
    data_raw |= (field_value & 0xFF) << 8
    # dc_voltage | Offset: 16, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dc_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DC Voltage'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 16
    
    # dc_current | Offset: 32, Length: 24, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dc_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DC Current'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFF) << 32
    
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_128000() -> bool:
    """Return True if PGN 128000 is a fast PGN."""
    return False
def decode_pgn_128000(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128000."""
    nmea2000Message = NMEA2000Message(128000, 'leewayAngle', 'Leeway Angle')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # leeway_angle | Offset: 8, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    leeway_angle_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    if leeway_angle_raw is not None and leeway_angle_raw & (1 << (16 - 1)):
        leeway_angle_raw -= (1 << 16)
    leeway_angle = leeway_angle_raw * 0.0001 if leeway_angle_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('leeway_angle', 'Leeway Angle', "", 'rad', leeway_angle, leeway_angle_raw))

    # reserved_24 | Offset: 24, Length: 40, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_24_raw = (data_raw >> 24) & 0xFFFFFFFFFF
    reserved_24 = reserved_24_raw * 1 if reserved_24_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_24', 'Reserved', "", '', reserved_24, reserved_24_raw))

    return nmea2000Message

def encode_pgn_128000(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128000."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # leeway_angle | Offset: 8, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'leeway_angle'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Leeway Angle'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 8
    
    # reserved_24 | Offset: 24, Length: 40, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_24'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFFFF) << 24
    return data_raw


def is_fast_pgn_128001() -> bool:
    """Return True if PGN 128001 is a fast PGN."""
    return False
def decode_pgn_128001(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128001."""
    nmea2000Message = NMEA2000Message(128001, 'vesselAcceleration', 'Vessel Acceleration')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # longitudinal_acceleration | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    longitudinal_acceleration_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    if longitudinal_acceleration_raw is not None and longitudinal_acceleration_raw & (1 << (16 - 1)):
        longitudinal_acceleration_raw -= (1 << 16)
    longitudinal_acceleration = longitudinal_acceleration_raw * 1 if longitudinal_acceleration_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitudinal_acceleration', 'Longitudinal Acceleration', "", '', longitudinal_acceleration, longitudinal_acceleration_raw))

    # transverse_acceleration | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    transverse_acceleration_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    if transverse_acceleration_raw is not None and transverse_acceleration_raw & (1 << (16 - 1)):
        transverse_acceleration_raw -= (1 << 16)
    transverse_acceleration = transverse_acceleration_raw * 1 if transverse_acceleration_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('transverse_acceleration', 'Transverse Acceleration', "", '', transverse_acceleration, transverse_acceleration_raw))

    # vertical_acceleration | Offset: 40, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    vertical_acceleration_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    if vertical_acceleration_raw is not None and vertical_acceleration_raw & (1 << (16 - 1)):
        vertical_acceleration_raw -= (1 << 16)
    vertical_acceleration = vertical_acceleration_raw * 1 if vertical_acceleration_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('vertical_acceleration', 'Vertical Acceleration', "", '', vertical_acceleration, vertical_acceleration_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_128001(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128001."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # longitudinal_acceleration | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitudinal_acceleration'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitudinal Acceleration'")
    data_raw |= (field_value & 0xFFFF) << 8
    # transverse_acceleration | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'transverse_acceleration'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Transverse Acceleration'")
    data_raw |= (field_value & 0xFFFF) << 24
    # vertical_acceleration | Offset: 40, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'vertical_acceleration'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Vertical Acceleration'")
    data_raw |= (field_value & 0xFFFF) << 40
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_128002() -> bool:
    """Return True if PGN 128002 is a fast PGN."""
    return False
def decode_pgn_128002(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128002."""
    nmea2000Message = NMEA2000Message(128002, 'electricDriveStatusRapidUpdate', 'Electric Drive Status, Rapid Update')
    # inverter_motor_controller | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    inverter_motor_controller_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    inverter_motor_controller = inverter_motor_controller_raw * 1 if inverter_motor_controller_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('inverter_motor_controller', 'Inverter/Motor Controller', "", '', inverter_motor_controller, inverter_motor_controller_raw))

    # active_motor_mode | Offset: 8, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    active_motor_mode_raw = decode_number((data_raw >> 8) & 0x3, 2)
    active_motor_mode = active_motor_mode_raw * 1 if active_motor_mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('active_motor_mode', 'Active Motor Mode', "", '', active_motor_mode, active_motor_mode_raw))

    # brake_mode | Offset: 10, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    brake_mode_raw = decode_number((data_raw >> 10) & 0x3, 2)
    brake_mode = brake_mode_raw * 1 if brake_mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('brake_mode', 'Brake Mode', "", '', brake_mode, brake_mode_raw))

    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_12_raw = (data_raw >> 12) & 0xF
    reserved_12 = reserved_12_raw * 1 if reserved_12_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_12', 'Reserved', "", '', reserved_12, reserved_12_raw))

    # rotational_shaft_speed | Offset: 16, Length: 16, Resolution: 0.25, Field Type: NUMBER, Match: 
    rotational_shaft_speed_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    rotational_shaft_speed = rotational_shaft_speed_raw * 0.25 if rotational_shaft_speed_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rotational_shaft_speed', 'Rotational Shaft Speed', "", 'rpm', rotational_shaft_speed, rotational_shaft_speed_raw))

    # motor_dc_voltage | Offset: 32, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    motor_dc_voltage_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    motor_dc_voltage = motor_dc_voltage_raw * 0.1 if motor_dc_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('motor_dc_voltage', 'Motor DC Voltage', "", 'V', motor_dc_voltage, motor_dc_voltage_raw))

    # motor_dc_current | Offset: 48, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    motor_dc_current_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    if motor_dc_current_raw is not None and motor_dc_current_raw & (1 << (16 - 1)):
        motor_dc_current_raw -= (1 << 16)
    motor_dc_current = motor_dc_current_raw * 0.1 if motor_dc_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('motor_dc_current', 'Motor DC Current', "", 'A', motor_dc_current, motor_dc_current_raw))

    return nmea2000Message

def encode_pgn_128002(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128002."""
    data_raw = 0
    # inverter_motor_controller | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'inverter_motor_controller'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Inverter/Motor Controller'")
    data_raw |= (field_value & 0xFF) << 0
    # active_motor_mode | Offset: 8, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'active_motor_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Active Motor Mode'")
    data_raw |= (field_value & 0x3) << 8
    # brake_mode | Offset: 10, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'brake_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Brake Mode'")
    data_raw |= (field_value & 0x3) << 10
    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_12'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 12
    # rotational_shaft_speed | Offset: 16, Length: 16, Resolution: 0.25, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rotational_shaft_speed'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rotational Shaft Speed'")        
    data_raw |= (int(field_value / 0.25) & 0xFFFF) << 16
    
    # motor_dc_voltage | Offset: 32, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'motor_dc_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor DC Voltage'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 32
    
    # motor_dc_current | Offset: 48, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'motor_dc_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor DC Current'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 48
    
    return data_raw


def is_fast_pgn_128003() -> bool:
    """Return True if PGN 128003 is a fast PGN."""
    return False
def decode_pgn_128003(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128003."""
    nmea2000Message = NMEA2000Message(128003, 'electricEnergyStorageStatusRapidUpdate', 'Electric Energy Storage Status, Rapid Update')
    # energy_storage_identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    energy_storage_identifier_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    energy_storage_identifier = energy_storage_identifier_raw * 1 if energy_storage_identifier_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('energy_storage_identifier', 'Energy Storage Identifier', "", '', energy_storage_identifier, energy_storage_identifier_raw))

    # battery_status | Offset: 8, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    battery_status_raw = decode_number((data_raw >> 8) & 0x3, 2)
    battery_status = battery_status_raw * 1 if battery_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('battery_status', 'Battery Status', "", '', battery_status, battery_status_raw))

    # isolation_status | Offset: 10, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    isolation_status_raw = decode_number((data_raw >> 10) & 0x3, 2)
    isolation_status = isolation_status_raw * 1 if isolation_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('isolation_status', 'Isolation Status', "", '', isolation_status, isolation_status_raw))

    # battery_error | Offset: 12, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    battery_error_raw = decode_number((data_raw >> 12) & 0xF, 4)
    battery_error = battery_error_raw * 1 if battery_error_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('battery_error', 'Battery Error', "", '', battery_error, battery_error_raw))

    # battery_voltage | Offset: 16, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    battery_voltage_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    battery_voltage = battery_voltage_raw * 0.1 if battery_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('battery_voltage', 'Battery Voltage', "", 'V', battery_voltage, battery_voltage_raw))

    # battery_current | Offset: 32, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    battery_current_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    if battery_current_raw is not None and battery_current_raw & (1 << (16 - 1)):
        battery_current_raw -= (1 << 16)
    battery_current = battery_current_raw * 0.1 if battery_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('battery_current', 'Battery Current', "", 'A', battery_current, battery_current_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_128003(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128003."""
    data_raw = 0
    # energy_storage_identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'energy_storage_identifier'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Energy Storage Identifier'")
    data_raw |= (field_value & 0xFF) << 0
    # battery_status | Offset: 8, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'battery_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Battery Status'")
    data_raw |= (field_value & 0x3) << 8
    # isolation_status | Offset: 10, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'isolation_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Isolation Status'")
    data_raw |= (field_value & 0x3) << 10
    # battery_error | Offset: 12, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'battery_error'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Battery Error'")
    data_raw |= (field_value & 0xF) << 12
    # battery_voltage | Offset: 16, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'battery_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Battery Voltage'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 16
    
    # battery_current | Offset: 32, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'battery_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Battery Current'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 32
    
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_128006() -> bool:
    """Return True if PGN 128006 is a fast PGN."""
    return False
def decode_pgn_128006(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128006."""
    nmea2000Message = NMEA2000Message(128006, 'thrusterControlStatus', 'Thruster Control Status')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # identifier | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    identifier_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    identifier = identifier_raw * 1 if identifier_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('identifier', 'Identifier', "", '', identifier, identifier_raw))

    # direction_control | Offset: 16, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    direction_control_raw = (data_raw >> 16) & 0xF
    direction_control = lookup_THRUSTER_DIRECTION_CONTROL(direction_control_raw)
    nmea2000Message.fields.append(NMEA2000Field('direction_control', 'Direction Control', "", '', direction_control, direction_control_raw))

    # power_enabled | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    power_enabled_raw = (data_raw >> 20) & 0x3
    power_enabled = lookup_OFF_ON(power_enabled_raw)
    nmea2000Message.fields.append(NMEA2000Field('power_enabled', 'Power Enabled', "", '', power_enabled, power_enabled_raw))

    # retract_control | Offset: 22, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    retract_control_raw = (data_raw >> 22) & 0x3
    retract_control = lookup_THRUSTER_RETRACT_CONTROL(retract_control_raw)
    nmea2000Message.fields.append(NMEA2000Field('retract_control', 'Retract Control', "", '', retract_control, retract_control_raw))

    # speed_control | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    speed_control_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    speed_control = speed_control_raw * 1 if speed_control_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('speed_control', 'Speed Control', "", '%', speed_control, speed_control_raw))

    # control_events | Offset: 32, Length: 8, Resolution: 1, Field Type: BITLOOKUP, Match: 
    control_events_raw = (data_raw >> 32) & 0xFF
    control_events = control_events_raw * 1 if control_events_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('control_events', 'Control Events', "", '', control_events, control_events_raw))

    # command_timeout | Offset: 40, Length: 8, Resolution: 0.005, Field Type: TIME, Match: 
    command_timeout_raw = (data_raw >> 40) & 0xFF
    command_timeout = decode_time(command_timeout_raw * 0.005)
    nmea2000Message.fields.append(NMEA2000Field('command_timeout', 'Command Timeout', "", 's', command_timeout, command_timeout_raw))

    # azimuth_control | Offset: 48, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    azimuth_control_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    azimuth_control = azimuth_control_raw * 0.0001 if azimuth_control_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('azimuth_control', 'Azimuth Control', "", 'rad', azimuth_control, azimuth_control_raw))

    return nmea2000Message

def encode_pgn_128006(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128006."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # identifier | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'identifier'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Identifier'")
    data_raw |= (field_value & 0xFF) << 8
    # direction_control | Offset: 16, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_THRUSTER_DIRECTION_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'direction_control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Direction Control'")
    data_raw |= (field_value & 0xF) << 16
    # power_enabled | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'power_enabled'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power Enabled'")
    data_raw |= (field_value & 0x3) << 20
    # retract_control | Offset: 22, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_THRUSTER_RETRACT_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'retract_control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Retract Control'")
    data_raw |= (field_value & 0x3) << 22
    # speed_control | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'speed_control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Speed Control'")
    data_raw |= (field_value & 0xFF) << 24
    # control_events | Offset: 32, Length: 8, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'control_events'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control Events'")
    data_raw |= (field_value & 0xFF) << 32
    # command_timeout | Offset: 40, Length: 8, Resolution: 0.005, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'command_timeout'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Command Timeout'")        
    data_raw |= (int(field_value / 0.005) & 0xFF) << 40
    
    # azimuth_control | Offset: 48, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'azimuth_control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Azimuth Control'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 48
    
    return data_raw


def is_fast_pgn_128007() -> bool:
    """Return True if PGN 128007 is a fast PGN."""
    return False
def decode_pgn_128007(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128007."""
    nmea2000Message = NMEA2000Message(128007, 'thrusterInformation', 'Thruster Information')
    # identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    identifier_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    identifier = identifier_raw * 1 if identifier_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('identifier', 'Identifier', "", '', identifier, identifier_raw))

    # motor_type | Offset: 8, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    motor_type_raw = (data_raw >> 8) & 0xF
    motor_type = lookup_THRUSTER_MOTOR_TYPE(motor_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('motor_type', 'Motor Type', "", '', motor_type, motor_type_raw))

    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_12_raw = (data_raw >> 12) & 0xF
    reserved_12 = reserved_12_raw * 1 if reserved_12_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_12', 'Reserved', "", '', reserved_12, reserved_12_raw))

    # power_rating | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    power_rating_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    power_rating = power_rating_raw * 1 if power_rating_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power_rating', 'Power Rating', "", 'W', power_rating, power_rating_raw))

    # maximum_temperature_rating | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    maximum_temperature_rating_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    maximum_temperature_rating = maximum_temperature_rating_raw * 0.01 if maximum_temperature_rating_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('maximum_temperature_rating', 'Maximum Temperature Rating', "", 'K', maximum_temperature_rating, maximum_temperature_rating_raw))

    # maximum_rotational_speed | Offset: 48, Length: 16, Resolution: 0.25, Field Type: NUMBER, Match: 
    maximum_rotational_speed_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    maximum_rotational_speed = maximum_rotational_speed_raw * 0.25 if maximum_rotational_speed_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('maximum_rotational_speed', 'Maximum Rotational Speed', "", 'rpm', maximum_rotational_speed, maximum_rotational_speed_raw))

    return nmea2000Message

def encode_pgn_128007(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128007."""
    data_raw = 0
    # identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'identifier'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Identifier'")
    data_raw |= (field_value & 0xFF) << 0
    # motor_type | Offset: 8, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_THRUSTER_MOTOR_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'motor_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor Type'")
    data_raw |= (field_value & 0xF) << 8
    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_12'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 12
    # power_rating | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power_rating'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power Rating'")
    data_raw |= (field_value & 0xFFFF) << 16
    # maximum_temperature_rating | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'maximum_temperature_rating'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Maximum Temperature Rating'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 32
    
    # maximum_rotational_speed | Offset: 48, Length: 16, Resolution: 0.25, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'maximum_rotational_speed'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Maximum Rotational Speed'")        
    data_raw |= (int(field_value / 0.25) & 0xFFFF) << 48
    
    return data_raw


def is_fast_pgn_128008() -> bool:
    """Return True if PGN 128008 is a fast PGN."""
    return False
def decode_pgn_128008(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128008."""
    nmea2000Message = NMEA2000Message(128008, 'thrusterMotorStatus', 'Thruster Motor Status')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # identifier | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    identifier_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    identifier = identifier_raw * 1 if identifier_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('identifier', 'Identifier', "", '', identifier, identifier_raw))

    # motor_events | Offset: 16, Length: 8, Resolution: 1, Field Type: BITLOOKUP, Match: 
    motor_events_raw = (data_raw >> 16) & 0xFF
    motor_events = motor_events_raw * 1 if motor_events_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('motor_events', 'Motor Events', "", '', motor_events, motor_events_raw))

    # current | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    current_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    current = current_raw * 1 if current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('current', 'Current', "", 'A', current, current_raw))

    # temperature | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    temperature_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    temperature = temperature_raw * 0.01 if temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('temperature', 'Temperature', "", 'K', temperature, temperature_raw))

    # operating_time | Offset: 48, Length: 16, Resolution: 60, Field Type: TIME, Match: 
    operating_time_raw = (data_raw >> 48) & 0xFFFF
    operating_time = decode_time(operating_time_raw * 60)
    nmea2000Message.fields.append(NMEA2000Field('operating_time', 'Operating Time', "", 's', operating_time, operating_time_raw))

    return nmea2000Message

def encode_pgn_128008(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128008."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # identifier | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'identifier'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Identifier'")
    data_raw |= (field_value & 0xFF) << 8
    # motor_events | Offset: 16, Length: 8, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'motor_events'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor Events'")
    data_raw |= (field_value & 0xFF) << 16
    # current | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Current'")
    data_raw |= (field_value & 0xFF) << 24
    # temperature | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 32
    
    # operating_time | Offset: 48, Length: 16, Resolution: 60, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'operating_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Operating Time'")        
    data_raw |= (int(field_value / 60) & 0xFFFF) << 48
    
    return data_raw


def is_fast_pgn_128259() -> bool:
    """Return True if PGN 128259 is a fast PGN."""
    return False
def decode_pgn_128259(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128259."""
    nmea2000Message = NMEA2000Message(128259, 'speed', 'Speed')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # speed_water_referenced | Offset: 8, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    speed_water_referenced_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    speed_water_referenced = speed_water_referenced_raw * 0.01 if speed_water_referenced_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('speed_water_referenced', 'Speed Water Referenced', "", 'm/s', speed_water_referenced, speed_water_referenced_raw))

    # speed_ground_referenced | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    speed_ground_referenced_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    speed_ground_referenced = speed_ground_referenced_raw * 0.01 if speed_ground_referenced_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('speed_ground_referenced', 'Speed Ground Referenced', "", 'm/s', speed_ground_referenced, speed_ground_referenced_raw))

    # speed_water_referenced_type | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    speed_water_referenced_type_raw = (data_raw >> 40) & 0xFF
    speed_water_referenced_type = lookup_WATER_REFERENCE(speed_water_referenced_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('speed_water_referenced_type', 'Speed Water Referenced Type', "", '', speed_water_referenced_type, speed_water_referenced_type_raw))

    # speed_direction | Offset: 48, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    speed_direction_raw = decode_number((data_raw >> 48) & 0xF, 4)
    speed_direction = speed_direction_raw * 1 if speed_direction_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('speed_direction', 'Speed Direction', "", '', speed_direction, speed_direction_raw))

    # reserved_52 | Offset: 52, Length: 12, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_52_raw = (data_raw >> 52) & 0xFFF
    reserved_52 = reserved_52_raw * 1 if reserved_52_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_52', 'Reserved', "", '', reserved_52, reserved_52_raw))

    return nmea2000Message

def encode_pgn_128259(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128259."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # speed_water_referenced | Offset: 8, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'speed_water_referenced'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Speed Water Referenced'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 8
    
    # speed_ground_referenced | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'speed_ground_referenced'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Speed Ground Referenced'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 24
    
    # speed_water_referenced_type | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_WATER_REFERENCE(f.value) for f in nmea2000Message.fields if f.id == 'speed_water_referenced_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Speed Water Referenced Type'")
    data_raw |= (field_value & 0xFF) << 40
    # speed_direction | Offset: 48, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'speed_direction'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Speed Direction'")
    data_raw |= (field_value & 0xF) << 48
    # reserved_52 | Offset: 52, Length: 12, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_52'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFF) << 52
    return data_raw


def is_fast_pgn_128267() -> bool:
    """Return True if PGN 128267 is a fast PGN."""
    return False
def decode_pgn_128267(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128267."""
    nmea2000Message = NMEA2000Message(128267, 'waterDepth', 'Water Depth')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # depth | Offset: 8, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    depth_raw = decode_number((data_raw >> 8) & 0xFFFFFFFF, 32)
    depth = depth_raw * 0.01 if depth_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('depth', 'Depth', "Depth below transducer", 'm', depth, depth_raw))

    # offset | Offset: 40, Length: 16, Resolution: 0.001, Field Type: NUMBER, Match: 
    offset_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    if offset_raw is not None and offset_raw & (1 << (16 - 1)):
        offset_raw -= (1 << 16)
    offset = offset_raw * 0.001 if offset_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('offset', 'Offset', "Distance between transducer and surface (positive) or keel (negative)", 'm', offset, offset_raw))

    # range | Offset: 56, Length: 8, Resolution: 10, Field Type: NUMBER, Match: 
    range_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    range = range_raw * 10 if range_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('range', 'Range', "Max measurement range", 'm', range, range_raw))

    return nmea2000Message

def encode_pgn_128267(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128267."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # depth | Offset: 8, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'depth'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Depth'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 8
    
    # offset | Offset: 40, Length: 16, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Offset'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 40
    
    # range | Offset: 56, Length: 8, Resolution: 10, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'range'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Range'")        
    data_raw |= (int(field_value / 10) & 0xFF) << 56
    
    return data_raw


def is_fast_pgn_128275() -> bool:
    """Return True if PGN 128275 is a fast PGN."""
    return True
def decode_pgn_128275(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128275."""
    nmea2000Message = NMEA2000Message(128275, 'distanceLog', 'Distance Log')
    # date | Offset: 0, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    date_raw = (data_raw >> 0) & 0xFFFF
    date = decode_date(date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('date', 'Date', "", 'd', date, date_raw))

    # time | Offset: 16, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    time_raw = (data_raw >> 16) & 0xFFFFFFFF
    time = decode_time(time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('time', 'Time', "Seconds since midnight", 's', time, time_raw))

    # log | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    log_raw = decode_number((data_raw >> 48) & 0xFFFFFFFF, 32)
    log = log_raw * 1 if log_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('log', 'Log', "Total cumulative distance", 'm', log, log_raw))

    # trip_log | Offset: 80, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    trip_log_raw = decode_number((data_raw >> 80) & 0xFFFFFFFF, 32)
    trip_log = trip_log_raw * 1 if trip_log_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('trip_log', 'Trip Log', "Distance since last reset", 'm', trip_log, trip_log_raw))

    return nmea2000Message

def encode_pgn_128275(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128275."""
    data_raw = 0
    # date | Offset: 0, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Date'")
    data_raw |= (field_value & 0xFFFF) << 0
    # time | Offset: 16, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 16
    
    # log | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'log'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Log'")
    data_raw |= (field_value & 0xFFFFFFFF) << 48
    # trip_log | Offset: 80, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'trip_log'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Trip Log'")
    data_raw |= (field_value & 0xFFFFFFFF) << 80
    return data_raw


def is_fast_pgn_128520() -> bool:
    """Return True if PGN 128520 is a fast PGN."""
    return True
def decode_pgn_128520(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128520."""
    nmea2000Message = NMEA2000Message(128520, 'trackedTargetData', 'Tracked Target Data')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # target_id__ | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    target_id___raw = decode_number((data_raw >> 8) & 0xFF, 8)
    target_id__ = target_id___raw * 1 if target_id___raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('target_id__', 'Target ID #', "Number of route, waypoint, event, mark, etc.", '', target_id__, target_id___raw))

    # track_status | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    track_status_raw = (data_raw >> 16) & 0x3
    track_status = lookup_TRACKING(track_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('track_status', 'Track Status', "", '', track_status, track_status_raw))

    # reported_target | Offset: 18, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    reported_target_raw = (data_raw >> 18) & 0x1
    reported_target = lookup_YES_NO(reported_target_raw)
    nmea2000Message.fields.append(NMEA2000Field('reported_target', 'Reported Target', "", '', reported_target, reported_target_raw))

    # target_acquisition | Offset: 19, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    target_acquisition_raw = (data_raw >> 19) & 0x1
    target_acquisition = lookup_TARGET_ACQUISITION(target_acquisition_raw)
    nmea2000Message.fields.append(NMEA2000Field('target_acquisition', 'Target Acquisition', "", '', target_acquisition, target_acquisition_raw))

    # bearing_reference | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    bearing_reference_raw = (data_raw >> 20) & 0x3
    bearing_reference = lookup_DIRECTION_REFERENCE(bearing_reference_raw)
    nmea2000Message.fields.append(NMEA2000Field('bearing_reference', 'Bearing Reference', "", '', bearing_reference, bearing_reference_raw))

    # reserved_22 | Offset: 22, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_22_raw = (data_raw >> 22) & 0x3
    reserved_22 = reserved_22_raw * 1 if reserved_22_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_22', 'Reserved', "", '', reserved_22, reserved_22_raw))

    # bearing | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    bearing_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    bearing = bearing_raw * 0.0001 if bearing_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('bearing', 'Bearing', "", 'rad', bearing, bearing_raw))

    # distance | Offset: 40, Length: 32, Resolution: 0.001, Field Type: NUMBER, Match: 
    distance_raw = decode_number((data_raw >> 40) & 0xFFFFFFFF, 32)
    distance = distance_raw * 0.001 if distance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('distance', 'Distance', "", 'm', distance, distance_raw))

    # course | Offset: 72, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    course_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    course = course_raw * 0.0001 if course_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('course', 'Course', "", 'rad', course, course_raw))

    # speed | Offset: 88, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    speed_raw = decode_number((data_raw >> 88) & 0xFFFF, 16)
    speed = speed_raw * 0.01 if speed_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('speed', 'Speed', "", 'm/s', speed, speed_raw))

    # cpa | Offset: 104, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    cpa_raw = decode_number((data_raw >> 104) & 0xFFFFFFFF, 32)
    cpa = cpa_raw * 0.01 if cpa_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('cpa', 'CPA', "", 'm', cpa, cpa_raw))

    # tcpa | Offset: 136, Length: 32, Resolution: 0.001, Field Type: TIME, Match: 
    tcpa_raw = (data_raw >> 136) & 0xFFFFFFFF
    if tcpa_raw is not None and tcpa_raw & (1 << (32 - 1)):
        tcpa_raw -= (1 << 32)
    tcpa = decode_time(tcpa_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('tcpa', 'TCPA', "negative = time elapsed since event, positive = time to go", 's', tcpa, tcpa_raw))

    # utc_of_fix | Offset: 168, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    utc_of_fix_raw = (data_raw >> 168) & 0xFFFFFFFF
    utc_of_fix = decode_time(utc_of_fix_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('utc_of_fix', 'UTC of Fix', "Seconds since midnight", 's', utc_of_fix, utc_of_fix_raw))

    # name | Offset: 200, Length: 1664, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_128520(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128520."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # target_id__ | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'target_id__'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Target ID #'")
    data_raw |= (field_value & 0xFF) << 8
    # track_status | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TRACKING(f.value) for f in nmea2000Message.fields if f.id == 'track_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Track Status'")
    data_raw |= (field_value & 0x3) << 16
    # reported_target | Offset: 18, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'reported_target'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reported Target'")
    data_raw |= (field_value & 0x1) << 18
    # target_acquisition | Offset: 19, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TARGET_ACQUISITION(f.value) for f in nmea2000Message.fields if f.id == 'target_acquisition'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Target Acquisition'")
    data_raw |= (field_value & 0x1) << 19
    # bearing_reference | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIRECTION_REFERENCE(f.value) for f in nmea2000Message.fields if f.id == 'bearing_reference'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Bearing Reference'")
    data_raw |= (field_value & 0x3) << 20
    # reserved_22 | Offset: 22, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_22'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 22
    # bearing | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'bearing'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Bearing'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 24
    
    # distance | Offset: 40, Length: 32, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'distance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Distance'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFFFF) << 40
    
    # course | Offset: 72, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'course'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Course'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 72
    
    # speed | Offset: 88, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'speed'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Speed'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 88
    
    # cpa | Offset: 104, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'cpa'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'CPA'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 104
    
    # tcpa | Offset: 136, Length: 32, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'tcpa'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'TCPA'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFFFF) << 136
    
    # utc_of_fix | Offset: 168, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'utc_of_fix'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'UTC of Fix'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 168
    
    # name | Offset: 200, Length: 1664, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Name'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 200
    return data_raw


def is_fast_pgn_128538() -> bool:
    """Return True if PGN 128538 is a fast PGN."""
    return True
def decode_pgn_128538(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128538."""
    nmea2000Message = NMEA2000Message(128538, 'elevatorCarStatus', 'Elevator Car Status')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # elevator_car_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_car_id_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    elevator_car_id = elevator_car_id_raw * 1 if elevator_car_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_car_id', 'Elevator Car ID', "", '', elevator_car_id, elevator_car_id_raw))

    # elevator_car_usage | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_car_usage_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    elevator_car_usage = elevator_car_usage_raw * 1 if elevator_car_usage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_car_usage', 'Elevator Car Usage', "", '', elevator_car_usage, elevator_car_usage_raw))

    # smoke_sensor_status | Offset: 24, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    smoke_sensor_status_raw = decode_number((data_raw >> 24) & 0x3, 2)
    smoke_sensor_status = smoke_sensor_status_raw * 1 if smoke_sensor_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('smoke_sensor_status', 'Smoke Sensor Status', "", '', smoke_sensor_status, smoke_sensor_status_raw))

    # limit_switch_sensor_status | Offset: 26, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    limit_switch_sensor_status_raw = decode_number((data_raw >> 26) & 0x3, 2)
    limit_switch_sensor_status = limit_switch_sensor_status_raw * 1 if limit_switch_sensor_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('limit_switch_sensor_status', 'Limit Switch Sensor Status', "", '', limit_switch_sensor_status, limit_switch_sensor_status_raw))

    # proximity_switch_sensor_status | Offset: 28, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    proximity_switch_sensor_status_raw = decode_number((data_raw >> 28) & 0x3, 2)
    proximity_switch_sensor_status = proximity_switch_sensor_status_raw * 1 if proximity_switch_sensor_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('proximity_switch_sensor_status', 'Proximity Switch Sensor Status', "", '', proximity_switch_sensor_status, proximity_switch_sensor_status_raw))

    # inertial_measurement_unit__imu__sensor_status | Offset: 30, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    inertial_measurement_unit__imu__sensor_status_raw = decode_number((data_raw >> 30) & 0x3, 2)
    inertial_measurement_unit__imu__sensor_status = inertial_measurement_unit__imu__sensor_status_raw * 1 if inertial_measurement_unit__imu__sensor_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('inertial_measurement_unit__imu__sensor_status', 'Inertial Measurement Unit (IMU) Sensor Status', "", '', inertial_measurement_unit__imu__sensor_status, inertial_measurement_unit__imu__sensor_status_raw))

    # elevator_load_limit_status | Offset: 32, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_load_limit_status_raw = decode_number((data_raw >> 32) & 0x3, 2)
    elevator_load_limit_status = elevator_load_limit_status_raw * 1 if elevator_load_limit_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_load_limit_status', 'Elevator Load Limit Status', "", '', elevator_load_limit_status, elevator_load_limit_status_raw))

    # elevator_load_balance_status | Offset: 34, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_load_balance_status_raw = decode_number((data_raw >> 34) & 0x3, 2)
    elevator_load_balance_status = elevator_load_balance_status_raw * 1 if elevator_load_balance_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_load_balance_status', 'Elevator Load Balance Status', "", '', elevator_load_balance_status, elevator_load_balance_status_raw))

    # elevator_load_sensor_1_status | Offset: 36, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_load_sensor_1_status_raw = decode_number((data_raw >> 36) & 0x3, 2)
    elevator_load_sensor_1_status = elevator_load_sensor_1_status_raw * 1 if elevator_load_sensor_1_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_load_sensor_1_status', 'Elevator Load Sensor 1 Status', "", '', elevator_load_sensor_1_status, elevator_load_sensor_1_status_raw))

    # elevator_load_sensor_2_status | Offset: 38, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_load_sensor_2_status_raw = decode_number((data_raw >> 38) & 0x3, 2)
    elevator_load_sensor_2_status = elevator_load_sensor_2_status_raw * 1 if elevator_load_sensor_2_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_load_sensor_2_status', 'Elevator Load Sensor 2 Status', "", '', elevator_load_sensor_2_status, elevator_load_sensor_2_status_raw))

    # elevator_load_sensor_3_status | Offset: 40, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_load_sensor_3_status_raw = decode_number((data_raw >> 40) & 0x3, 2)
    elevator_load_sensor_3_status = elevator_load_sensor_3_status_raw * 1 if elevator_load_sensor_3_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_load_sensor_3_status', 'Elevator Load Sensor 3 Status', "", '', elevator_load_sensor_3_status, elevator_load_sensor_3_status_raw))

    # elevator_load_sensor_4_status | Offset: 42, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_load_sensor_4_status_raw = decode_number((data_raw >> 42) & 0x3, 2)
    elevator_load_sensor_4_status = elevator_load_sensor_4_status_raw * 1 if elevator_load_sensor_4_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_load_sensor_4_status', 'Elevator Load Sensor 4 Status', "", '', elevator_load_sensor_4_status, elevator_load_sensor_4_status_raw))

    # reserved_44 | Offset: 44, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_44_raw = (data_raw >> 44) & 0xF
    reserved_44 = reserved_44_raw * 1 if reserved_44_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_44', 'Reserved', "", '', reserved_44, reserved_44_raw))

    # elevator_car_motion_status | Offset: 48, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_car_motion_status_raw = decode_number((data_raw >> 48) & 0x3, 2)
    elevator_car_motion_status = elevator_car_motion_status_raw * 1 if elevator_car_motion_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_car_motion_status', 'Elevator Car Motion Status', "", '', elevator_car_motion_status, elevator_car_motion_status_raw))

    # elevator_car_door_status | Offset: 50, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_car_door_status_raw = decode_number((data_raw >> 50) & 0x3, 2)
    elevator_car_door_status = elevator_car_door_status_raw * 1 if elevator_car_door_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_car_door_status', 'Elevator Car Door Status', "", '', elevator_car_door_status, elevator_car_door_status_raw))

    # elevator_car_emergency_button_status | Offset: 52, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_car_emergency_button_status_raw = decode_number((data_raw >> 52) & 0x3, 2)
    elevator_car_emergency_button_status = elevator_car_emergency_button_status_raw * 1 if elevator_car_emergency_button_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_car_emergency_button_status', 'Elevator Car Emergency Button Status', "", '', elevator_car_emergency_button_status, elevator_car_emergency_button_status_raw))

    # elevator_car_buzzer_status | Offset: 54, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_car_buzzer_status_raw = decode_number((data_raw >> 54) & 0x3, 2)
    elevator_car_buzzer_status = elevator_car_buzzer_status_raw * 1 if elevator_car_buzzer_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_car_buzzer_status', 'Elevator Car Buzzer Status', "", '', elevator_car_buzzer_status, elevator_car_buzzer_status_raw))

    # open_door_button_status | Offset: 56, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    open_door_button_status_raw = decode_number((data_raw >> 56) & 0x3, 2)
    open_door_button_status = open_door_button_status_raw * 1 if open_door_button_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('open_door_button_status', 'Open Door Button Status', "", '', open_door_button_status, open_door_button_status_raw))

    # close_door_button_status | Offset: 58, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    close_door_button_status_raw = decode_number((data_raw >> 58) & 0x3, 2)
    close_door_button_status = close_door_button_status_raw * 1 if close_door_button_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('close_door_button_status', 'Close Door Button Status', "", '', close_door_button_status, close_door_button_status_raw))

    # reserved_60 | Offset: 60, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_60_raw = (data_raw >> 60) & 0xF
    reserved_60 = reserved_60_raw * 1 if reserved_60_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_60', 'Reserved', "", '', reserved_60, reserved_60_raw))

    # current_deck | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    current_deck_raw = decode_number((data_raw >> 64) & 0xFF, 8)
    current_deck = current_deck_raw * 1 if current_deck_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('current_deck', 'Current Deck', "", '', current_deck, current_deck_raw))

    # destination_deck | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    destination_deck_raw = decode_number((data_raw >> 72) & 0xFF, 8)
    destination_deck = destination_deck_raw * 1 if destination_deck_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('destination_deck', 'Destination Deck', "", '', destination_deck, destination_deck_raw))

    # total_number_of_decks | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    total_number_of_decks_raw = decode_number((data_raw >> 80) & 0xFF, 8)
    total_number_of_decks = total_number_of_decks_raw * 1 if total_number_of_decks_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_number_of_decks', 'Total Number of Decks', "", '', total_number_of_decks, total_number_of_decks_raw))

    # weight_of_load_cell_1 | Offset: 88, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    weight_of_load_cell_1_raw = decode_number((data_raw >> 88) & 0xFFFF, 16)
    weight_of_load_cell_1 = weight_of_load_cell_1_raw * 1 if weight_of_load_cell_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('weight_of_load_cell_1', 'Weight of Load Cell 1', "", '', weight_of_load_cell_1, weight_of_load_cell_1_raw))

    # weight_of_load_cell_2 | Offset: 104, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    weight_of_load_cell_2_raw = decode_number((data_raw >> 104) & 0xFFFF, 16)
    weight_of_load_cell_2 = weight_of_load_cell_2_raw * 1 if weight_of_load_cell_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('weight_of_load_cell_2', 'Weight of Load Cell 2', "", '', weight_of_load_cell_2, weight_of_load_cell_2_raw))

    # weight_of_load_cell_3 | Offset: 120, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    weight_of_load_cell_3_raw = decode_number((data_raw >> 120) & 0xFFFF, 16)
    weight_of_load_cell_3 = weight_of_load_cell_3_raw * 1 if weight_of_load_cell_3_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('weight_of_load_cell_3', 'Weight of Load Cell 3', "", '', weight_of_load_cell_3, weight_of_load_cell_3_raw))

    # weight_of_load_cell_4 | Offset: 136, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    weight_of_load_cell_4_raw = decode_number((data_raw >> 136) & 0xFFFF, 16)
    weight_of_load_cell_4 = weight_of_load_cell_4_raw * 1 if weight_of_load_cell_4_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('weight_of_load_cell_4', 'Weight of Load Cell 4', "", '', weight_of_load_cell_4, weight_of_load_cell_4_raw))

    # speed_of_elevator_car | Offset: 152, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    speed_of_elevator_car_raw = decode_number((data_raw >> 152) & 0xFFFF, 16)
    if speed_of_elevator_car_raw is not None and speed_of_elevator_car_raw & (1 << (16 - 1)):
        speed_of_elevator_car_raw -= (1 << 16)
    speed_of_elevator_car = speed_of_elevator_car_raw * 0.01 if speed_of_elevator_car_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('speed_of_elevator_car', 'Speed of Elevator Car', "", 'm/s', speed_of_elevator_car, speed_of_elevator_car_raw))

    # elevator_brake_status | Offset: 168, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_brake_status_raw = decode_number((data_raw >> 168) & 0x3, 2)
    elevator_brake_status = elevator_brake_status_raw * 1 if elevator_brake_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_brake_status', 'Elevator Brake Status', "", '', elevator_brake_status, elevator_brake_status_raw))

    # elevator_motor_rotation_control_status | Offset: 170, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_motor_rotation_control_status_raw = decode_number((data_raw >> 170) & 0x3, 2)
    elevator_motor_rotation_control_status = elevator_motor_rotation_control_status_raw * 1 if elevator_motor_rotation_control_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_motor_rotation_control_status', 'Elevator Motor rotation control Status', "", '', elevator_motor_rotation_control_status, elevator_motor_rotation_control_status_raw))

    # reserved_172 | Offset: 172, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_172_raw = (data_raw >> 172) & 0xF
    reserved_172 = reserved_172_raw * 1 if reserved_172_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_172', 'Reserved', "", '', reserved_172, reserved_172_raw))

    return nmea2000Message

def encode_pgn_128538(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128538."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # elevator_car_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_car_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Car ID'")
    data_raw |= (field_value & 0xFF) << 8
    # elevator_car_usage | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_car_usage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Car Usage'")
    data_raw |= (field_value & 0xFF) << 16
    # smoke_sensor_status | Offset: 24, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'smoke_sensor_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Smoke Sensor Status'")
    data_raw |= (field_value & 0x3) << 24
    # limit_switch_sensor_status | Offset: 26, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'limit_switch_sensor_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Limit Switch Sensor Status'")
    data_raw |= (field_value & 0x3) << 26
    # proximity_switch_sensor_status | Offset: 28, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'proximity_switch_sensor_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proximity Switch Sensor Status'")
    data_raw |= (field_value & 0x3) << 28
    # inertial_measurement_unit__imu__sensor_status | Offset: 30, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'inertial_measurement_unit__imu__sensor_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Inertial Measurement Unit (IMU) Sensor Status'")
    data_raw |= (field_value & 0x3) << 30
    # elevator_load_limit_status | Offset: 32, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_load_limit_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Load Limit Status'")
    data_raw |= (field_value & 0x3) << 32
    # elevator_load_balance_status | Offset: 34, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_load_balance_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Load Balance Status'")
    data_raw |= (field_value & 0x3) << 34
    # elevator_load_sensor_1_status | Offset: 36, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_load_sensor_1_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Load Sensor 1 Status'")
    data_raw |= (field_value & 0x3) << 36
    # elevator_load_sensor_2_status | Offset: 38, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_load_sensor_2_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Load Sensor 2 Status'")
    data_raw |= (field_value & 0x3) << 38
    # elevator_load_sensor_3_status | Offset: 40, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_load_sensor_3_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Load Sensor 3 Status'")
    data_raw |= (field_value & 0x3) << 40
    # elevator_load_sensor_4_status | Offset: 42, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_load_sensor_4_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Load Sensor 4 Status'")
    data_raw |= (field_value & 0x3) << 42
    # reserved_44 | Offset: 44, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_44'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 44
    # elevator_car_motion_status | Offset: 48, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_car_motion_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Car Motion Status'")
    data_raw |= (field_value & 0x3) << 48
    # elevator_car_door_status | Offset: 50, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_car_door_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Car Door Status'")
    data_raw |= (field_value & 0x3) << 50
    # elevator_car_emergency_button_status | Offset: 52, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_car_emergency_button_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Car Emergency Button Status'")
    data_raw |= (field_value & 0x3) << 52
    # elevator_car_buzzer_status | Offset: 54, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_car_buzzer_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Car Buzzer Status'")
    data_raw |= (field_value & 0x3) << 54
    # open_door_button_status | Offset: 56, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'open_door_button_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Open Door Button Status'")
    data_raw |= (field_value & 0x3) << 56
    # close_door_button_status | Offset: 58, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'close_door_button_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Close Door Button Status'")
    data_raw |= (field_value & 0x3) << 58
    # reserved_60 | Offset: 60, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_60'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 60
    # current_deck | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'current_deck'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Current Deck'")
    data_raw |= (field_value & 0xFF) << 64
    # destination_deck | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'destination_deck'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination Deck'")
    data_raw |= (field_value & 0xFF) << 72
    # total_number_of_decks | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_number_of_decks'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total Number of Decks'")
    data_raw |= (field_value & 0xFF) << 80
    # weight_of_load_cell_1 | Offset: 88, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'weight_of_load_cell_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Weight of Load Cell 1'")
    data_raw |= (field_value & 0xFFFF) << 88
    # weight_of_load_cell_2 | Offset: 104, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'weight_of_load_cell_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Weight of Load Cell 2'")
    data_raw |= (field_value & 0xFFFF) << 104
    # weight_of_load_cell_3 | Offset: 120, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'weight_of_load_cell_3'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Weight of Load Cell 3'")
    data_raw |= (field_value & 0xFFFF) << 120
    # weight_of_load_cell_4 | Offset: 136, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'weight_of_load_cell_4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Weight of Load Cell 4'")
    data_raw |= (field_value & 0xFFFF) << 136
    # speed_of_elevator_car | Offset: 152, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'speed_of_elevator_car'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Speed of Elevator Car'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 152
    
    # elevator_brake_status | Offset: 168, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_brake_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Brake Status'")
    data_raw |= (field_value & 0x3) << 168
    # elevator_motor_rotation_control_status | Offset: 170, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_motor_rotation_control_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Motor rotation control Status'")
    data_raw |= (field_value & 0x3) << 170
    # reserved_172 | Offset: 172, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_172'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 172
    return data_raw


def is_fast_pgn_128768() -> bool:
    """Return True if PGN 128768 is a fast PGN."""
    return False
def decode_pgn_128768(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128768."""
    nmea2000Message = NMEA2000Message(128768, 'elevatorMotorControl', 'Elevator Motor Control')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # elevator_car_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_car_id_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    elevator_car_id = elevator_car_id_raw * 1 if elevator_car_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_car_id', 'Elevator Car ID', "", '', elevator_car_id, elevator_car_id_raw))

    # elevator_car_usage | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_car_usage_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    elevator_car_usage = elevator_car_usage_raw * 1 if elevator_car_usage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_car_usage', 'Elevator Car Usage', "", '', elevator_car_usage, elevator_car_usage_raw))

    # motor_acceleration_deceleration_profile_selection | Offset: 24, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    motor_acceleration_deceleration_profile_selection_raw = decode_number((data_raw >> 24) & 0xF, 4)
    motor_acceleration_deceleration_profile_selection = motor_acceleration_deceleration_profile_selection_raw * 1 if motor_acceleration_deceleration_profile_selection_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('motor_acceleration_deceleration_profile_selection', 'Motor Acceleration/Deceleration profile selection', "", '', motor_acceleration_deceleration_profile_selection, motor_acceleration_deceleration_profile_selection_raw))

    # motor_rotational_control_status | Offset: 28, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    motor_rotational_control_status_raw = decode_number((data_raw >> 28) & 0x3, 2)
    motor_rotational_control_status = motor_rotational_control_status_raw * 1 if motor_rotational_control_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('motor_rotational_control_status', 'Motor Rotational Control Status', "", '', motor_rotational_control_status, motor_rotational_control_status_raw))

    # reserved_30 | Offset: 30, Length: 34, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_30_raw = (data_raw >> 30) & 0x3FFFFFFFF
    reserved_30 = reserved_30_raw * 1 if reserved_30_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_30', 'Reserved', "", '', reserved_30, reserved_30_raw))

    return nmea2000Message

def encode_pgn_128768(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128768."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # elevator_car_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_car_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Car ID'")
    data_raw |= (field_value & 0xFF) << 8
    # elevator_car_usage | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_car_usage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Car Usage'")
    data_raw |= (field_value & 0xFF) << 16
    # motor_acceleration_deceleration_profile_selection | Offset: 24, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'motor_acceleration_deceleration_profile_selection'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor Acceleration/Deceleration profile selection'")
    data_raw |= (field_value & 0xF) << 24
    # motor_rotational_control_status | Offset: 28, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'motor_rotational_control_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor Rotational Control Status'")
    data_raw |= (field_value & 0x3) << 28
    # reserved_30 | Offset: 30, Length: 34, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_30'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3FFFFFFFF) << 30
    return data_raw


def is_fast_pgn_128769() -> bool:
    """Return True if PGN 128769 is a fast PGN."""
    return False
def decode_pgn_128769(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128769."""
    nmea2000Message = NMEA2000Message(128769, 'elevatorDeckPushButton', 'Elevator Deck Push Button')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # elevator_call_button_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_call_button_id_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    elevator_call_button_id = elevator_call_button_id_raw * 1 if elevator_call_button_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_call_button_id', 'Elevator Call Button ID', "", '', elevator_call_button_id, elevator_call_button_id_raw))

    # deck_button_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    deck_button_id_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    deck_button_id = deck_button_id_raw * 1 if deck_button_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('deck_button_id', 'Deck Button ID', "", '', deck_button_id, deck_button_id_raw))

    # elevator_car_usage | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_car_usage_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    elevator_car_usage = elevator_car_usage_raw * 1 if elevator_car_usage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_car_usage', 'Elevator Car Usage', "", '', elevator_car_usage, elevator_car_usage_raw))

    # elevator_car_button_selection | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    elevator_car_button_selection_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    elevator_car_button_selection = elevator_car_button_selection_raw * 1 if elevator_car_button_selection_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevator_car_button_selection', 'Elevator Car Button Selection', "", '', elevator_car_button_selection, elevator_car_button_selection_raw))

    # reserved_40 | Offset: 40, Length: 24, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0xFFFFFF
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    return nmea2000Message

def encode_pgn_128769(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128769."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # elevator_call_button_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_call_button_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Call Button ID'")
    data_raw |= (field_value & 0xFF) << 8
    # deck_button_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'deck_button_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Deck Button ID'")
    data_raw |= (field_value & 0xFF) << 16
    # elevator_car_usage | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_car_usage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Car Usage'")
    data_raw |= (field_value & 0xFF) << 24
    # elevator_car_button_selection | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevator_car_button_selection'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevator Car Button Selection'")
    data_raw |= (field_value & 0xFF) << 32
    # reserved_40 | Offset: 40, Length: 24, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    return data_raw


def is_fast_pgn_128776() -> bool:
    """Return True if PGN 128776 is a fast PGN."""
    return False
def decode_pgn_128776(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128776."""
    nmea2000Message = NMEA2000Message(128776, 'windlassControlStatus', 'Windlass Control Status')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # windlass_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    windlass_id_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    windlass_id = windlass_id_raw * 1 if windlass_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('windlass_id', 'Windlass ID', "", '', windlass_id, windlass_id_raw))

    # windlass_direction_control | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    windlass_direction_control_raw = (data_raw >> 16) & 0x3
    windlass_direction_control = lookup_WINDLASS_DIRECTION(windlass_direction_control_raw)
    nmea2000Message.fields.append(NMEA2000Field('windlass_direction_control', 'Windlass Direction Control', "", '', windlass_direction_control, windlass_direction_control_raw))

    # anchor_docking_control | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    anchor_docking_control_raw = (data_raw >> 18) & 0x3
    anchor_docking_control = lookup_OFF_ON(anchor_docking_control_raw)
    nmea2000Message.fields.append(NMEA2000Field('anchor_docking_control', 'Anchor Docking Control', "", '', anchor_docking_control, anchor_docking_control_raw))

    # speed_control_type | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    speed_control_type_raw = (data_raw >> 20) & 0x3
    speed_control_type = lookup_SPEED_TYPE(speed_control_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('speed_control_type', 'Speed Control Type', "", '', speed_control_type, speed_control_type_raw))

    # reserved_22 | Offset: 22, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_22_raw = (data_raw >> 22) & 0x3
    reserved_22 = reserved_22_raw * 1 if reserved_22_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_22', 'Reserved', "", '', reserved_22, reserved_22_raw))

    # speed_control | Offset: 24, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    speed_control_raw = (data_raw >> 24) & 0xFF
    speed_control = speed_control_raw * 1 if speed_control_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('speed_control', 'Speed Control', "0=Off,Single speed:1-100=On,Dual Speed:1-49=Slow/50-100=Fast,Proportional:10-100", '', speed_control, speed_control_raw))

    # power_enable | Offset: 32, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    power_enable_raw = (data_raw >> 32) & 0x3
    power_enable = lookup_OFF_ON(power_enable_raw)
    nmea2000Message.fields.append(NMEA2000Field('power_enable', 'Power Enable', "", '', power_enable, power_enable_raw))

    # mechanical_lock | Offset: 34, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    mechanical_lock_raw = (data_raw >> 34) & 0x3
    mechanical_lock = lookup_OFF_ON(mechanical_lock_raw)
    nmea2000Message.fields.append(NMEA2000Field('mechanical_lock', 'Mechanical Lock', "", '', mechanical_lock, mechanical_lock_raw))

    # deck_and_anchor_wash | Offset: 36, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    deck_and_anchor_wash_raw = (data_raw >> 36) & 0x3
    deck_and_anchor_wash = lookup_OFF_ON(deck_and_anchor_wash_raw)
    nmea2000Message.fields.append(NMEA2000Field('deck_and_anchor_wash', 'Deck and Anchor Wash', "", '', deck_and_anchor_wash, deck_and_anchor_wash_raw))

    # anchor_light | Offset: 38, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    anchor_light_raw = (data_raw >> 38) & 0x3
    anchor_light = lookup_OFF_ON(anchor_light_raw)
    nmea2000Message.fields.append(NMEA2000Field('anchor_light', 'Anchor Light', "", '', anchor_light, anchor_light_raw))

    # command_timeout | Offset: 40, Length: 8, Resolution: 0.005, Field Type: TIME, Match: 
    command_timeout_raw = (data_raw >> 40) & 0xFF
    command_timeout = decode_time(command_timeout_raw * 0.005)
    nmea2000Message.fields.append(NMEA2000Field('command_timeout', 'Command Timeout', "If timeout elapses the thruster stops operating and reverts to static mode", 's', command_timeout, command_timeout_raw))

    # windlass_control_events | Offset: 48, Length: 4, Resolution: 1, Field Type: BITLOOKUP, Match: 
    windlass_control_events_raw = (data_raw >> 48) & 0xF
    windlass_control_events = windlass_control_events_raw * 1 if windlass_control_events_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('windlass_control_events', 'Windlass Control Events', "", '', windlass_control_events, windlass_control_events_raw))

    # reserved_52 | Offset: 52, Length: 12, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_52_raw = (data_raw >> 52) & 0xFFF
    reserved_52 = reserved_52_raw * 1 if reserved_52_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_52', 'Reserved', "", '', reserved_52, reserved_52_raw))

    return nmea2000Message

def encode_pgn_128776(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128776."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # windlass_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'windlass_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Windlass ID'")
    data_raw |= (field_value & 0xFF) << 8
    # windlass_direction_control | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_WINDLASS_DIRECTION(f.value) for f in nmea2000Message.fields if f.id == 'windlass_direction_control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Windlass Direction Control'")
    data_raw |= (field_value & 0x3) << 16
    # anchor_docking_control | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'anchor_docking_control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Anchor Docking Control'")
    data_raw |= (field_value & 0x3) << 18
    # speed_control_type | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SPEED_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'speed_control_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Speed Control Type'")
    data_raw |= (field_value & 0x3) << 20
    # reserved_22 | Offset: 22, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_22'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 22
    # speed_control | Offset: 24, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'speed_control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Speed Control'")
    data_raw |= (field_value & 0xFF) << 24
    # power_enable | Offset: 32, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'power_enable'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power Enable'")
    data_raw |= (field_value & 0x3) << 32
    # mechanical_lock | Offset: 34, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'mechanical_lock'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mechanical Lock'")
    data_raw |= (field_value & 0x3) << 34
    # deck_and_anchor_wash | Offset: 36, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'deck_and_anchor_wash'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Deck and Anchor Wash'")
    data_raw |= (field_value & 0x3) << 36
    # anchor_light | Offset: 38, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'anchor_light'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Anchor Light'")
    data_raw |= (field_value & 0x3) << 38
    # command_timeout | Offset: 40, Length: 8, Resolution: 0.005, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'command_timeout'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Command Timeout'")        
    data_raw |= (int(field_value / 0.005) & 0xFF) << 40
    
    # windlass_control_events | Offset: 48, Length: 4, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'windlass_control_events'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Windlass Control Events'")
    data_raw |= (field_value & 0xF) << 48
    # reserved_52 | Offset: 52, Length: 12, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_52'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFF) << 52
    return data_raw


def is_fast_pgn_128777() -> bool:
    """Return True if PGN 128777 is a fast PGN."""
    return False
def decode_pgn_128777(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128777."""
    nmea2000Message = NMEA2000Message(128777, 'anchorWindlassOperatingStatus', 'Anchor Windlass Operating Status')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # windlass_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    windlass_id_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    windlass_id = windlass_id_raw * 1 if windlass_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('windlass_id', 'Windlass ID', "", '', windlass_id, windlass_id_raw))

    # windlass_direction_control | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    windlass_direction_control_raw = (data_raw >> 16) & 0x3
    windlass_direction_control = lookup_WINDLASS_DIRECTION(windlass_direction_control_raw)
    nmea2000Message.fields.append(NMEA2000Field('windlass_direction_control', 'Windlass Direction Control', "", '', windlass_direction_control, windlass_direction_control_raw))

    # windlass_motion_status | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    windlass_motion_status_raw = (data_raw >> 18) & 0x3
    windlass_motion_status = lookup_WINDLASS_MOTION(windlass_motion_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('windlass_motion_status', 'Windlass Motion Status', "", '', windlass_motion_status, windlass_motion_status_raw))

    # rode_type_status | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    rode_type_status_raw = (data_raw >> 20) & 0x3
    rode_type_status = lookup_RODE_TYPE(rode_type_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('rode_type_status', 'Rode Type Status', "", '', rode_type_status, rode_type_status_raw))

    # reserved_22 | Offset: 22, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_22_raw = (data_raw >> 22) & 0x3
    reserved_22 = reserved_22_raw * 1 if reserved_22_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_22', 'Reserved', "", '', reserved_22, reserved_22_raw))

    # rode_counter_value | Offset: 24, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    rode_counter_value_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    rode_counter_value = rode_counter_value_raw * 0.1 if rode_counter_value_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rode_counter_value', 'Rode Counter Value', "", 'm', rode_counter_value, rode_counter_value_raw))

    # windlass_line_speed | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    windlass_line_speed_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    windlass_line_speed = windlass_line_speed_raw * 0.01 if windlass_line_speed_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('windlass_line_speed', 'Windlass Line Speed', "", 'm/s', windlass_line_speed, windlass_line_speed_raw))

    # anchor_docking_status | Offset: 56, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    anchor_docking_status_raw = (data_raw >> 56) & 0x3
    anchor_docking_status = lookup_DOCKING_STATUS(anchor_docking_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('anchor_docking_status', 'Anchor Docking Status', "", '', anchor_docking_status, anchor_docking_status_raw))

    # windlass_operating_events | Offset: 58, Length: 6, Resolution: 1, Field Type: BITLOOKUP, Match: 
    windlass_operating_events_raw = (data_raw >> 58) & 0x3F
    windlass_operating_events = windlass_operating_events_raw * 1 if windlass_operating_events_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('windlass_operating_events', 'Windlass Operating Events', "", '', windlass_operating_events, windlass_operating_events_raw))

    return nmea2000Message

def encode_pgn_128777(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128777."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # windlass_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'windlass_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Windlass ID'")
    data_raw |= (field_value & 0xFF) << 8
    # windlass_direction_control | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_WINDLASS_DIRECTION(f.value) for f in nmea2000Message.fields if f.id == 'windlass_direction_control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Windlass Direction Control'")
    data_raw |= (field_value & 0x3) << 16
    # windlass_motion_status | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_WINDLASS_MOTION(f.value) for f in nmea2000Message.fields if f.id == 'windlass_motion_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Windlass Motion Status'")
    data_raw |= (field_value & 0x3) << 18
    # rode_type_status | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RODE_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'rode_type_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rode Type Status'")
    data_raw |= (field_value & 0x3) << 20
    # reserved_22 | Offset: 22, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_22'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 22
    # rode_counter_value | Offset: 24, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rode_counter_value'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rode Counter Value'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 24
    
    # windlass_line_speed | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'windlass_line_speed'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Windlass Line Speed'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 40
    
    # anchor_docking_status | Offset: 56, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DOCKING_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'anchor_docking_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Anchor Docking Status'")
    data_raw |= (field_value & 0x3) << 56
    # windlass_operating_events | Offset: 58, Length: 6, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'windlass_operating_events'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Windlass Operating Events'")
    data_raw |= (field_value & 0x3F) << 58
    return data_raw


def is_fast_pgn_128778() -> bool:
    """Return True if PGN 128778 is a fast PGN."""
    return False
def decode_pgn_128778(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128778."""
    nmea2000Message = NMEA2000Message(128778, 'anchorWindlassMonitoringStatus', 'Anchor Windlass Monitoring Status')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # windlass_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    windlass_id_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    windlass_id = windlass_id_raw * 1 if windlass_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('windlass_id', 'Windlass ID', "", '', windlass_id, windlass_id_raw))

    # windlass_monitoring_events | Offset: 16, Length: 8, Resolution: 1, Field Type: BITLOOKUP, Match: 
    windlass_monitoring_events_raw = (data_raw >> 16) & 0xFF
    windlass_monitoring_events = windlass_monitoring_events_raw * 1 if windlass_monitoring_events_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('windlass_monitoring_events', 'Windlass Monitoring Events', "", '', windlass_monitoring_events, windlass_monitoring_events_raw))

    # controller_voltage | Offset: 24, Length: 8, Resolution: 0.2, Field Type: NUMBER, Match: 
    controller_voltage_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    controller_voltage = controller_voltage_raw * 0.2 if controller_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('controller_voltage', 'Controller voltage', "", 'V', controller_voltage, controller_voltage_raw))

    # motor_current | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    motor_current_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    motor_current = motor_current_raw * 1 if motor_current_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('motor_current', 'Motor current', "", 'A', motor_current, motor_current_raw))

    # total_motor_time | Offset: 40, Length: 16, Resolution: 60, Field Type: TIME, Match: 
    total_motor_time_raw = (data_raw >> 40) & 0xFFFF
    total_motor_time = decode_time(total_motor_time_raw * 60)
    nmea2000Message.fields.append(NMEA2000Field('total_motor_time', 'Total Motor Time', "", 's', total_motor_time, total_motor_time_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_128778(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128778."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # windlass_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'windlass_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Windlass ID'")
    data_raw |= (field_value & 0xFF) << 8
    # windlass_monitoring_events | Offset: 16, Length: 8, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'windlass_monitoring_events'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Windlass Monitoring Events'")
    data_raw |= (field_value & 0xFF) << 16
    # controller_voltage | Offset: 24, Length: 8, Resolution: 0.2, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'controller_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Controller voltage'")        
    data_raw |= (int(field_value / 0.2) & 0xFF) << 24
    
    # motor_current | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'motor_current'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Motor current'")
    data_raw |= (field_value & 0xFF) << 32
    # total_motor_time | Offset: 40, Length: 16, Resolution: 60, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_motor_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total Motor Time'")        
    data_raw |= (int(field_value / 60) & 0xFFFF) << 40
    
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_128780() -> bool:
    """Return True if PGN 128780 is a fast PGN."""
    return False
def decode_pgn_128780(data_raw: int) -> NMEA2000Message:
    """Decode PGN 128780."""
    nmea2000Message = NMEA2000Message(128780, 'linearActuatorControlStatus', 'Linear Actuator Control/Status')
    # actuator_identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    actuator_identifier_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    actuator_identifier = actuator_identifier_raw * 1 if actuator_identifier_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('actuator_identifier', 'Actuator Identifier', "", '', actuator_identifier, actuator_identifier_raw))

    # commanded_device_position | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    commanded_device_position_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    commanded_device_position = commanded_device_position_raw * 1 if commanded_device_position_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('commanded_device_position', 'Commanded Device Position', "", '', commanded_device_position, commanded_device_position_raw))

    # device_position | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    device_position_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    device_position = device_position_raw * 1 if device_position_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('device_position', 'Device Position', "", '', device_position, device_position_raw))

    # maximum_device_travel | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    maximum_device_travel_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    maximum_device_travel = maximum_device_travel_raw * 1 if maximum_device_travel_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('maximum_device_travel', 'Maximum Device Travel', "", '', maximum_device_travel, maximum_device_travel_raw))

    # direction_of_travel | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    direction_of_travel_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    direction_of_travel = direction_of_travel_raw * 1 if direction_of_travel_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('direction_of_travel', 'Direction of Travel', "", '', direction_of_travel, direction_of_travel_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_128780(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 128780."""
    data_raw = 0
    # actuator_identifier | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'actuator_identifier'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Actuator Identifier'")
    data_raw |= (field_value & 0xFF) << 0
    # commanded_device_position | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'commanded_device_position'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Commanded Device Position'")
    data_raw |= (field_value & 0xFF) << 8
    # device_position | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'device_position'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device Position'")
    data_raw |= (field_value & 0xFF) << 16
    # maximum_device_travel | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'maximum_device_travel'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Maximum Device Travel'")
    data_raw |= (field_value & 0xFFFF) << 24
    # direction_of_travel | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'direction_of_travel'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Direction of Travel'")
    data_raw |= (field_value & 0xFF) << 40
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_129025() -> bool:
    """Return True if PGN 129025 is a fast PGN."""
    return False
def decode_pgn_129025(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129025."""
    nmea2000Message = NMEA2000Message(129025, 'positionRapidUpdate', 'Position, Rapid Update')
    # latitude | Offset: 0, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    latitude_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if latitude_raw is not None and latitude_raw & (1 << (32 - 1)):
        latitude_raw -= (1 << 32)
    latitude = latitude_raw * 1e-07 if latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('latitude', 'Latitude', "", 'deg', latitude, latitude_raw))

    # longitude | Offset: 32, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    longitude_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if longitude_raw is not None and longitude_raw & (1 << (32 - 1)):
        longitude_raw -= (1 << 32)
    longitude = longitude_raw * 1e-07 if longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitude', 'Longitude', "", 'deg', longitude, longitude_raw))

    return nmea2000Message

def encode_pgn_129025(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129025."""
    data_raw = 0
    # latitude | Offset: 0, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 0
    
    # longitude | Offset: 32, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 32
    
    return data_raw


def is_fast_pgn_129026() -> bool:
    """Return True if PGN 129026 is a fast PGN."""
    return False
def decode_pgn_129026(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129026."""
    nmea2000Message = NMEA2000Message(129026, 'cogSogRapidUpdate', 'COG & SOG, Rapid Update')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # cog_reference | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    cog_reference_raw = (data_raw >> 8) & 0x3
    cog_reference = lookup_DIRECTION_REFERENCE(cog_reference_raw)
    nmea2000Message.fields.append(NMEA2000Field('cog_reference', 'COG Reference', "", '', cog_reference, cog_reference_raw))

    # reserved_10 | Offset: 10, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_10_raw = (data_raw >> 10) & 0x3F
    reserved_10 = reserved_10_raw * 1 if reserved_10_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_10', 'Reserved', "", '', reserved_10, reserved_10_raw))

    # cog | Offset: 16, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    cog_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    cog = cog_raw * 0.0001 if cog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('cog', 'COG', "", 'rad', cog, cog_raw))

    # sog | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    sog_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    sog = sog_raw * 0.01 if sog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sog', 'SOG', "", 'm/s', sog, sog_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_129026(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129026."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # cog_reference | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIRECTION_REFERENCE(f.value) for f in nmea2000Message.fields if f.id == 'cog_reference'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'COG Reference'")
    data_raw |= (field_value & 0x3) << 8
    # reserved_10 | Offset: 10, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_10'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 10
    # cog | Offset: 16, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'cog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'COG'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 16
    
    # sog | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SOG'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 32
    
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_129027() -> bool:
    """Return True if PGN 129027 is a fast PGN."""
    return False
def decode_pgn_129027(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129027."""
    nmea2000Message = NMEA2000Message(129027, 'positionDeltaRapidUpdate', 'Position Delta, Rapid Update')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # time_delta | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    time_delta_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    time_delta = time_delta_raw * 1 if time_delta_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('time_delta', 'Time Delta', "", '', time_delta, time_delta_raw))

    # latitude_delta | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    latitude_delta_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    if latitude_delta_raw is not None and latitude_delta_raw & (1 << (16 - 1)):
        latitude_delta_raw -= (1 << 16)
    latitude_delta = latitude_delta_raw * 1 if latitude_delta_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('latitude_delta', 'Latitude Delta', "", '', latitude_delta, latitude_delta_raw))

    # longitude_delta | Offset: 40, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    longitude_delta_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    if longitude_delta_raw is not None and longitude_delta_raw & (1 << (16 - 1)):
        longitude_delta_raw -= (1 << 16)
    longitude_delta = longitude_delta_raw * 1 if longitude_delta_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitude_delta', 'Longitude Delta', "", '', longitude_delta, longitude_delta_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_129027(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129027."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # time_delta | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'time_delta'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time Delta'")
    data_raw |= (field_value & 0xFFFF) << 8
    # latitude_delta | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'latitude_delta'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Latitude Delta'")
    data_raw |= (field_value & 0xFFFF) << 24
    # longitude_delta | Offset: 40, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitude_delta'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitude Delta'")
    data_raw |= (field_value & 0xFFFF) << 40
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_129028() -> bool:
    """Return True if PGN 129028 is a fast PGN."""
    return False
def decode_pgn_129028(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129028."""
    nmea2000Message = NMEA2000Message(129028, 'altitudeDeltaRapidUpdate', 'Altitude Delta, Rapid Update')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # time_delta | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    time_delta_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    if time_delta_raw is not None and time_delta_raw & (1 << (16 - 1)):
        time_delta_raw -= (1 << 16)
    time_delta = time_delta_raw * 1 if time_delta_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('time_delta', 'Time Delta', "", '', time_delta, time_delta_raw))

    # gnss_quality | Offset: 24, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    gnss_quality_raw = decode_number((data_raw >> 24) & 0x3, 2)
    gnss_quality = gnss_quality_raw * 1 if gnss_quality_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('gnss_quality', 'GNSS Quality', "", '', gnss_quality, gnss_quality_raw))

    # direction | Offset: 26, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    direction_raw = decode_number((data_raw >> 26) & 0x3, 2)
    direction = direction_raw * 1 if direction_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('direction', 'Direction', "", '', direction, direction_raw))

    # reserved_28 | Offset: 28, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_28_raw = (data_raw >> 28) & 0xF
    reserved_28 = reserved_28_raw * 1 if reserved_28_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_28', 'Reserved', "", '', reserved_28, reserved_28_raw))

    # cog | Offset: 32, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    cog_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    cog = cog_raw * 0.0001 if cog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('cog', 'COG', "", 'rad', cog, cog_raw))

    # altitude_delta | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    altitude_delta_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    if altitude_delta_raw is not None and altitude_delta_raw & (1 << (16 - 1)):
        altitude_delta_raw -= (1 << 16)
    altitude_delta = altitude_delta_raw * 1 if altitude_delta_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('altitude_delta', 'Altitude Delta', "", '', altitude_delta, altitude_delta_raw))

    return nmea2000Message

def encode_pgn_129028(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129028."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # time_delta | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'time_delta'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time Delta'")
    data_raw |= (field_value & 0xFFFF) << 8
    # gnss_quality | Offset: 24, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'gnss_quality'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'GNSS Quality'")
    data_raw |= (field_value & 0x3) << 24
    # direction | Offset: 26, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'direction'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Direction'")
    data_raw |= (field_value & 0x3) << 26
    # reserved_28 | Offset: 28, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_28'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 28
    # cog | Offset: 32, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'cog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'COG'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 32
    
    # altitude_delta | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'altitude_delta'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Altitude Delta'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_129029() -> bool:
    """Return True if PGN 129029 is a fast PGN."""
    return True
def decode_pgn_129029(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129029."""
    nmea2000Message = NMEA2000Message(129029, 'gnssPositionData', 'GNSS Position Data')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # date | Offset: 8, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    date_raw = (data_raw >> 8) & 0xFFFF
    date = decode_date(date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('date', 'Date', "", 'd', date, date_raw))

    # time | Offset: 24, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    time_raw = (data_raw >> 24) & 0xFFFFFFFF
    time = decode_time(time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('time', 'Time', "Seconds since midnight", 's', time, time_raw))

    # latitude | Offset: 56, Length: 64, Resolution: 1e-16, Field Type: NUMBER, Match: 
    latitude_raw = decode_number((data_raw >> 56) & 0xFFFFFFFFFFFFFFFF, 64)
    if latitude_raw is not None and latitude_raw & (1 << (64 - 1)):
        latitude_raw -= (1 << 64)
    latitude = latitude_raw * 1e-16 if latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('latitude', 'Latitude', "", 'deg', latitude, latitude_raw))

    # longitude | Offset: 120, Length: 64, Resolution: 1e-16, Field Type: NUMBER, Match: 
    longitude_raw = decode_number((data_raw >> 120) & 0xFFFFFFFFFFFFFFFF, 64)
    if longitude_raw is not None and longitude_raw & (1 << (64 - 1)):
        longitude_raw -= (1 << 64)
    longitude = longitude_raw * 1e-16 if longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitude', 'Longitude', "", 'deg', longitude, longitude_raw))

    # altitude | Offset: 184, Length: 64, Resolution: 1e-06, Field Type: NUMBER, Match: 
    altitude_raw = decode_number((data_raw >> 184) & 0xFFFFFFFFFFFFFFFF, 64)
    if altitude_raw is not None and altitude_raw & (1 << (64 - 1)):
        altitude_raw -= (1 << 64)
    altitude = altitude_raw * 1e-06 if altitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('altitude', 'Altitude', "Altitude referenced to WGS-84", 'm', altitude, altitude_raw))

    # gnss_type | Offset: 248, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    gnss_type_raw = (data_raw >> 248) & 0xF
    gnss_type = lookup_GNS(gnss_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('gnss_type', 'GNSS type', "", '', gnss_type, gnss_type_raw))

    # method | Offset: 252, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    method_raw = (data_raw >> 252) & 0xF
    method = lookup_GNS_METHOD(method_raw)
    nmea2000Message.fields.append(NMEA2000Field('method', 'Method', "", '', method, method_raw))

    # integrity | Offset: 256, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    integrity_raw = (data_raw >> 256) & 0x3
    integrity = lookup_GNS_INTEGRITY(integrity_raw)
    nmea2000Message.fields.append(NMEA2000Field('integrity', 'Integrity', "", '', integrity, integrity_raw))

    # reserved_258 | Offset: 258, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_258_raw = (data_raw >> 258) & 0x3F
    reserved_258 = reserved_258_raw * 1 if reserved_258_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_258', 'Reserved', "", '', reserved_258, reserved_258_raw))

    # number_of_svs | Offset: 264, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_svs_raw = decode_number((data_raw >> 264) & 0xFF, 8)
    number_of_svs = number_of_svs_raw * 1 if number_of_svs_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_svs', 'Number of SVs', "Number of satellites used in solution", '', number_of_svs, number_of_svs_raw))

    # hdop | Offset: 272, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    hdop_raw = decode_number((data_raw >> 272) & 0xFFFF, 16)
    if hdop_raw is not None and hdop_raw & (1 << (16 - 1)):
        hdop_raw -= (1 << 16)
    hdop = hdop_raw * 0.01 if hdop_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('hdop', 'HDOP', "Horizontal dilution of precision", '', hdop, hdop_raw))

    # pdop | Offset: 288, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    pdop_raw = decode_number((data_raw >> 288) & 0xFFFF, 16)
    if pdop_raw is not None and pdop_raw & (1 << (16 - 1)):
        pdop_raw -= (1 << 16)
    pdop = pdop_raw * 0.01 if pdop_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pdop', 'PDOP', "Positional dilution of precision", '', pdop, pdop_raw))

    # geoidal_separation | Offset: 304, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    geoidal_separation_raw = decode_number((data_raw >> 304) & 0xFFFFFFFF, 32)
    if geoidal_separation_raw is not None and geoidal_separation_raw & (1 << (32 - 1)):
        geoidal_separation_raw -= (1 << 32)
    geoidal_separation = geoidal_separation_raw * 0.01 if geoidal_separation_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('geoidal_separation', 'Geoidal Separation', "Geoidal Separation", 'm', geoidal_separation, geoidal_separation_raw))

    # reference_stations | Offset: 336, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    reference_stations_raw = decode_number((data_raw >> 336) & 0xFF, 8)
    reference_stations = reference_stations_raw * 1 if reference_stations_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reference_stations', 'Reference Stations', "Number of reference stations", '', reference_stations, reference_stations_raw))

    # reference_station_type | Offset: 344, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    reference_station_type_raw = (data_raw >> 344) & 0xF
    reference_station_type = lookup_GNS(reference_station_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('reference_station_type', 'Reference Station Type', "", '', reference_station_type, reference_station_type_raw))

    # reference_station_id | Offset: 348, Length: 12, Resolution: 1, Field Type: NUMBER, Match: 
    reference_station_id_raw = decode_number((data_raw >> 348) & 0xFFF, 12)
    reference_station_id = reference_station_id_raw * 1 if reference_station_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reference_station_id', 'Reference Station ID', "", '', reference_station_id, reference_station_id_raw))

    # age_of_dgnss_corrections | Offset: 360, Length: 16, Resolution: 0.01, Field Type: TIME, Match: 
    age_of_dgnss_corrections_raw = (data_raw >> 360) & 0xFFFF
    age_of_dgnss_corrections = decode_time(age_of_dgnss_corrections_raw * 0.01)
    nmea2000Message.fields.append(NMEA2000Field('age_of_dgnss_corrections', 'Age of DGNSS Corrections', "", 's', age_of_dgnss_corrections, age_of_dgnss_corrections_raw))

    return nmea2000Message

def encode_pgn_129029(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129029."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # date | Offset: 8, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Date'")
    data_raw |= (field_value & 0xFFFF) << 8
    # time | Offset: 24, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 24
    
    # latitude | Offset: 56, Length: 64, Resolution: 1e-16, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Latitude'")        
    data_raw |= (int(field_value / 1e-16) & 0xFFFFFFFFFFFFFFFF) << 56
    
    # longitude | Offset: 120, Length: 64, Resolution: 1e-16, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitude'")        
    data_raw |= (int(field_value / 1e-16) & 0xFFFFFFFFFFFFFFFF) << 120
    
    # altitude | Offset: 184, Length: 64, Resolution: 1e-06, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'altitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Altitude'")        
    data_raw |= (int(field_value / 1e-06) & 0xFFFFFFFFFFFFFFFF) << 184
    
    # gnss_type | Offset: 248, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GNS(f.value) for f in nmea2000Message.fields if f.id == 'gnss_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'GNSS type'")
    data_raw |= (field_value & 0xF) << 248
    # method | Offset: 252, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GNS_METHOD(f.value) for f in nmea2000Message.fields if f.id == 'method'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Method'")
    data_raw |= (field_value & 0xF) << 252
    # integrity | Offset: 256, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GNS_INTEGRITY(f.value) for f in nmea2000Message.fields if f.id == 'integrity'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Integrity'")
    data_raw |= (field_value & 0x3) << 256
    # reserved_258 | Offset: 258, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_258'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 258
    # number_of_svs | Offset: 264, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_svs'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of SVs'")
    data_raw |= (field_value & 0xFF) << 264
    # hdop | Offset: 272, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'hdop'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'HDOP'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 272
    
    # pdop | Offset: 288, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pdop'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PDOP'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 288
    
    # geoidal_separation | Offset: 304, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'geoidal_separation'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Geoidal Separation'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 304
    
    # reference_stations | Offset: 336, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reference_stations'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reference Stations'")
    data_raw |= (field_value & 0xFF) << 336
    # reference_station_type | Offset: 344, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GNS(f.value) for f in nmea2000Message.fields if f.id == 'reference_station_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reference Station Type'")
    data_raw |= (field_value & 0xF) << 344
    # reference_station_id | Offset: 348, Length: 12, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reference_station_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reference Station ID'")
    data_raw |= (field_value & 0xFFF) << 348
    # age_of_dgnss_corrections | Offset: 360, Length: 16, Resolution: 0.01, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'age_of_dgnss_corrections'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Age of DGNSS Corrections'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 360
    
    return data_raw


def is_fast_pgn_129033() -> bool:
    """Return True if PGN 129033 is a fast PGN."""
    return False
def decode_pgn_129033(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129033."""
    nmea2000Message = NMEA2000Message(129033, 'timeDate', 'Time & Date')
    # date | Offset: 0, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    date_raw = (data_raw >> 0) & 0xFFFF
    date = decode_date(date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('date', 'Date', "", 'd', date, date_raw))

    # time | Offset: 16, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    time_raw = (data_raw >> 16) & 0xFFFFFFFF
    time = decode_time(time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('time', 'Time', "Seconds since midnight", 's', time, time_raw))

    # local_offset | Offset: 48, Length: 16, Resolution: 60, Field Type: TIME, Match: 
    local_offset_raw = (data_raw >> 48) & 0xFFFF
    if local_offset_raw is not None and local_offset_raw & (1 << (16 - 1)):
        local_offset_raw -= (1 << 16)
    local_offset = decode_time(local_offset_raw * 60)
    nmea2000Message.fields.append(NMEA2000Field('local_offset', 'Local Offset', "", 's', local_offset, local_offset_raw))

    return nmea2000Message

def encode_pgn_129033(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129033."""
    data_raw = 0
    # date | Offset: 0, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Date'")
    data_raw |= (field_value & 0xFFFF) << 0
    # time | Offset: 16, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 16
    
    # local_offset | Offset: 48, Length: 16, Resolution: 60, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'local_offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Local Offset'")        
    data_raw |= (int(field_value / 60) & 0xFFFF) << 48
    
    return data_raw


def is_fast_pgn_129038() -> bool:
    """Return True if PGN 129038 is a fast PGN."""
    return True
def decode_pgn_129038(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129038."""
    nmea2000Message = NMEA2000Message(129038, 'aisClassAPositionReport', 'AIS Class A Position Report')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    user_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    user_id = user_id_raw * 1 if user_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('user_id', 'User ID', "", '', user_id, user_id_raw))

    # longitude | Offset: 40, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    longitude_raw = decode_number((data_raw >> 40) & 0xFFFFFFFF, 32)
    if longitude_raw is not None and longitude_raw & (1 << (32 - 1)):
        longitude_raw -= (1 << 32)
    longitude = longitude_raw * 1e-07 if longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitude', 'Longitude', "", 'deg', longitude, longitude_raw))

    # latitude | Offset: 72, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    latitude_raw = decode_number((data_raw >> 72) & 0xFFFFFFFF, 32)
    if latitude_raw is not None and latitude_raw & (1 << (32 - 1)):
        latitude_raw -= (1 << 32)
    latitude = latitude_raw * 1e-07 if latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('latitude', 'Latitude', "", 'deg', latitude, latitude_raw))

    # position_accuracy | Offset: 104, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    position_accuracy_raw = (data_raw >> 104) & 0x1
    position_accuracy = lookup_POSITION_ACCURACY(position_accuracy_raw)
    nmea2000Message.fields.append(NMEA2000Field('position_accuracy', 'Position Accuracy', "", '', position_accuracy, position_accuracy_raw))

    # raim | Offset: 105, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    raim_raw = (data_raw >> 105) & 0x1
    raim = lookup_RAIM_FLAG(raim_raw)
    nmea2000Message.fields.append(NMEA2000Field('raim', 'RAIM', "", '', raim, raim_raw))

    # time_stamp | Offset: 106, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    time_stamp_raw = (data_raw >> 106) & 0x3F
    time_stamp = lookup_TIME_STAMP(time_stamp_raw)
    nmea2000Message.fields.append(NMEA2000Field('time_stamp', 'Time Stamp', "0-59 = UTC second when the report was generated", '', time_stamp, time_stamp_raw))

    # cog | Offset: 112, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    cog_raw = decode_number((data_raw >> 112) & 0xFFFF, 16)
    cog = cog_raw * 0.0001 if cog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('cog', 'COG', "", 'rad', cog, cog_raw))

    # sog | Offset: 128, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    sog_raw = decode_number((data_raw >> 128) & 0xFFFF, 16)
    sog = sog_raw * 0.01 if sog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sog', 'SOG', "", 'm/s', sog, sog_raw))

    # communication_state | Offset: 144, Length: 19, Resolution: 1, Field Type: BINARY, Match: 
    communication_state_raw = (data_raw >> 144) & 0x7FFFF
    communication_state = communication_state_raw * 1 if communication_state_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('communication_state', 'Communication State', "Information used by the TDMA slot allocation algorithm and synchronization information", '', communication_state, communication_state_raw))

    # ais_transceiver_information | Offset: 163, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 163) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # heading | Offset: 168, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    heading_raw = decode_number((data_raw >> 168) & 0xFFFF, 16)
    heading = heading_raw * 0.0001 if heading_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('heading', 'Heading', "True heading", 'rad', heading, heading_raw))

    # rate_of_turn | Offset: 184, Length: 16, Resolution: 3.125e-05, Field Type: NUMBER, Match: 
    rate_of_turn_raw = decode_number((data_raw >> 184) & 0xFFFF, 16)
    if rate_of_turn_raw is not None and rate_of_turn_raw & (1 << (16 - 1)):
        rate_of_turn_raw -= (1 << 16)
    rate_of_turn = rate_of_turn_raw * 3.125e-05 if rate_of_turn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rate_of_turn', 'Rate of Turn', "", 'rad/s', rate_of_turn, rate_of_turn_raw))

    # nav_status | Offset: 200, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    nav_status_raw = (data_raw >> 200) & 0xF
    nav_status = lookup_NAV_STATUS(nav_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('nav_status', 'Nav Status', "", '', nav_status, nav_status_raw))

    # special_maneuver_indicator | Offset: 204, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    special_maneuver_indicator_raw = (data_raw >> 204) & 0x3
    special_maneuver_indicator = lookup_AIS_SPECIAL_MANEUVER(special_maneuver_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('special_maneuver_indicator', 'Special Maneuver Indicator', "", '', special_maneuver_indicator, special_maneuver_indicator_raw))

    # reserved_206 | Offset: 206, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_206_raw = (data_raw >> 206) & 0x3
    reserved_206 = reserved_206_raw * 1 if reserved_206_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_206', 'Reserved', "", '', reserved_206, reserved_206_raw))

    # spare | Offset: 208, Length: 3, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 208) & 0x7
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # reserved_211 | Offset: 211, Length: 5, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_211_raw = (data_raw >> 211) & 0x1F
    reserved_211 = reserved_211_raw * 1 if reserved_211_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_211', 'Reserved', "", '', reserved_211, reserved_211_raw))

    # sequence_id | Offset: 216, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sequence_id_raw = decode_number((data_raw >> 216) & 0xFF, 8)
    sequence_id = sequence_id_raw * 1 if sequence_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sequence_id', 'Sequence ID', "", '', sequence_id, sequence_id_raw))

    return nmea2000Message

def encode_pgn_129038(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129038."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'user_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'User ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # longitude | Offset: 40, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 40
    
    # latitude | Offset: 72, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 72
    
    # position_accuracy | Offset: 104, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POSITION_ACCURACY(f.value) for f in nmea2000Message.fields if f.id == 'position_accuracy'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Accuracy'")
    data_raw |= (field_value & 0x1) << 104
    # raim | Offset: 105, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RAIM_FLAG(f.value) for f in nmea2000Message.fields if f.id == 'raim'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'RAIM'")
    data_raw |= (field_value & 0x1) << 105
    # time_stamp | Offset: 106, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TIME_STAMP(f.value) for f in nmea2000Message.fields if f.id == 'time_stamp'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time Stamp'")
    data_raw |= (field_value & 0x3F) << 106
    # cog | Offset: 112, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'cog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'COG'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 112
    
    # sog | Offset: 128, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SOG'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 128
    
    # communication_state | Offset: 144, Length: 19, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'communication_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Communication State'")
    data_raw |= (field_value & 0x7FFFF) << 144
    # ais_transceiver_information | Offset: 163, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 163
    # heading | Offset: 168, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'heading'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Heading'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 168
    
    # rate_of_turn | Offset: 184, Length: 16, Resolution: 3.125e-05, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rate_of_turn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rate of Turn'")        
    data_raw |= (int(field_value / 3.125e-05) & 0xFFFF) << 184
    
    # nav_status | Offset: 200, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_NAV_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'nav_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Nav Status'")
    data_raw |= (field_value & 0xF) << 200
    # special_maneuver_indicator | Offset: 204, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_SPECIAL_MANEUVER(f.value) for f in nmea2000Message.fields if f.id == 'special_maneuver_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Special Maneuver Indicator'")
    data_raw |= (field_value & 0x3) << 204
    # reserved_206 | Offset: 206, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_206'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 206
    # spare | Offset: 208, Length: 3, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0x7) << 208
    # reserved_211 | Offset: 211, Length: 5, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_211'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1F) << 211
    # sequence_id | Offset: 216, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sequence_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sequence ID'")
    data_raw |= (field_value & 0xFF) << 216
    return data_raw


def is_fast_pgn_129039() -> bool:
    """Return True if PGN 129039 is a fast PGN."""
    return True
def decode_pgn_129039(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129039."""
    nmea2000Message = NMEA2000Message(129039, 'aisClassBPositionReport', 'AIS Class B Position Report')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    user_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    user_id = user_id_raw * 1 if user_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('user_id', 'User ID', "", '', user_id, user_id_raw))

    # longitude | Offset: 40, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    longitude_raw = decode_number((data_raw >> 40) & 0xFFFFFFFF, 32)
    if longitude_raw is not None and longitude_raw & (1 << (32 - 1)):
        longitude_raw -= (1 << 32)
    longitude = longitude_raw * 1e-07 if longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitude', 'Longitude', "", 'deg', longitude, longitude_raw))

    # latitude | Offset: 72, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    latitude_raw = decode_number((data_raw >> 72) & 0xFFFFFFFF, 32)
    if latitude_raw is not None and latitude_raw & (1 << (32 - 1)):
        latitude_raw -= (1 << 32)
    latitude = latitude_raw * 1e-07 if latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('latitude', 'Latitude', "", 'deg', latitude, latitude_raw))

    # position_accuracy | Offset: 104, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    position_accuracy_raw = (data_raw >> 104) & 0x1
    position_accuracy = lookup_POSITION_ACCURACY(position_accuracy_raw)
    nmea2000Message.fields.append(NMEA2000Field('position_accuracy', 'Position Accuracy', "", '', position_accuracy, position_accuracy_raw))

    # raim | Offset: 105, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    raim_raw = (data_raw >> 105) & 0x1
    raim = lookup_RAIM_FLAG(raim_raw)
    nmea2000Message.fields.append(NMEA2000Field('raim', 'RAIM', "", '', raim, raim_raw))

    # time_stamp | Offset: 106, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    time_stamp_raw = (data_raw >> 106) & 0x3F
    time_stamp = lookup_TIME_STAMP(time_stamp_raw)
    nmea2000Message.fields.append(NMEA2000Field('time_stamp', 'Time Stamp', "", '', time_stamp, time_stamp_raw))

    # cog | Offset: 112, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    cog_raw = decode_number((data_raw >> 112) & 0xFFFF, 16)
    cog = cog_raw * 0.0001 if cog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('cog', 'COG', "", 'rad', cog, cog_raw))

    # sog | Offset: 128, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    sog_raw = decode_number((data_raw >> 128) & 0xFFFF, 16)
    sog = sog_raw * 0.01 if sog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sog', 'SOG', "", 'm/s', sog, sog_raw))

    # communication_state | Offset: 144, Length: 19, Resolution: 1, Field Type: BINARY, Match: 
    communication_state_raw = (data_raw >> 144) & 0x7FFFF
    communication_state = communication_state_raw * 1 if communication_state_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('communication_state', 'Communication State', "Information used by the TDMA slot allocation algorithm and synchronization information", '', communication_state, communication_state_raw))

    # ais_transceiver_information | Offset: 163, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 163) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # heading | Offset: 168, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    heading_raw = decode_number((data_raw >> 168) & 0xFFFF, 16)
    heading = heading_raw * 0.0001 if heading_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('heading', 'Heading', "True heading", 'rad', heading, heading_raw))

    # regional_application | Offset: 184, Length: 8, Resolution: 1, Field Type: SPARE, Match: 
    regional_application_raw = (data_raw >> 184) & 0xFF
    regional_application = regional_application_raw * 1 if regional_application_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('regional_application', 'Regional Application', "", '', regional_application, regional_application_raw))

    # regional_application_b | Offset: 192, Length: 2, Resolution: 1, Field Type: SPARE, Match: 
    regional_application_b_raw = (data_raw >> 192) & 0x3
    regional_application_b = regional_application_b_raw * 1 if regional_application_b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('regional_application_b', 'Regional Application B', "", '', regional_application_b, regional_application_b_raw))

    # unit_type | Offset: 194, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    unit_type_raw = (data_raw >> 194) & 0x1
    unit_type = lookup_AIS_TYPE(unit_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('unit_type', 'Unit type', "", '', unit_type, unit_type_raw))

    # integrated_display | Offset: 195, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    integrated_display_raw = (data_raw >> 195) & 0x1
    integrated_display = lookup_YES_NO(integrated_display_raw)
    nmea2000Message.fields.append(NMEA2000Field('integrated_display', 'Integrated Display', "Whether the unit can show messages 12 and 14", '', integrated_display, integrated_display_raw))

    # dsc | Offset: 196, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    dsc_raw = (data_raw >> 196) & 0x1
    dsc = lookup_YES_NO(dsc_raw)
    nmea2000Message.fields.append(NMEA2000Field('dsc', 'DSC', "", '', dsc, dsc_raw))

    # band | Offset: 197, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    band_raw = (data_raw >> 197) & 0x1
    band = lookup_AIS_BAND(band_raw)
    nmea2000Message.fields.append(NMEA2000Field('band', 'Band', "", '', band, band_raw))

    # can_handle_msg_22 | Offset: 198, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    can_handle_msg_22_raw = (data_raw >> 198) & 0x1
    can_handle_msg_22 = lookup_YES_NO(can_handle_msg_22_raw)
    nmea2000Message.fields.append(NMEA2000Field('can_handle_msg_22', 'Can handle Msg 22', "", '', can_handle_msg_22, can_handle_msg_22_raw))

    # ais_mode | Offset: 199, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_mode_raw = (data_raw >> 199) & 0x1
    ais_mode = lookup_AIS_MODE(ais_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_mode', 'AIS mode', "", '', ais_mode, ais_mode_raw))

    # ais_communication_state | Offset: 200, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_communication_state_raw = (data_raw >> 200) & 0x1
    ais_communication_state = lookup_AIS_COMMUNICATION_STATE(ais_communication_state_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_communication_state', 'AIS communication state', "", '', ais_communication_state, ais_communication_state_raw))

    # reserved_201 | Offset: 201, Length: 15, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_201_raw = (data_raw >> 201) & 0x7FFF
    reserved_201 = reserved_201_raw * 1 if reserved_201_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_201', 'Reserved', "", '', reserved_201, reserved_201_raw))

    return nmea2000Message

def encode_pgn_129039(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129039."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'user_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'User ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # longitude | Offset: 40, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 40
    
    # latitude | Offset: 72, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 72
    
    # position_accuracy | Offset: 104, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POSITION_ACCURACY(f.value) for f in nmea2000Message.fields if f.id == 'position_accuracy'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Accuracy'")
    data_raw |= (field_value & 0x1) << 104
    # raim | Offset: 105, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RAIM_FLAG(f.value) for f in nmea2000Message.fields if f.id == 'raim'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'RAIM'")
    data_raw |= (field_value & 0x1) << 105
    # time_stamp | Offset: 106, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TIME_STAMP(f.value) for f in nmea2000Message.fields if f.id == 'time_stamp'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time Stamp'")
    data_raw |= (field_value & 0x3F) << 106
    # cog | Offset: 112, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'cog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'COG'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 112
    
    # sog | Offset: 128, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SOG'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 128
    
    # communication_state | Offset: 144, Length: 19, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'communication_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Communication State'")
    data_raw |= (field_value & 0x7FFFF) << 144
    # ais_transceiver_information | Offset: 163, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 163
    # heading | Offset: 168, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'heading'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Heading'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 168
    
    # regional_application | Offset: 184, Length: 8, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'regional_application'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Regional Application'")
    data_raw |= (field_value & 0xFF) << 184
    # regional_application_b | Offset: 192, Length: 2, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'regional_application_b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Regional Application B'")
    data_raw |= (field_value & 0x3) << 192
    # unit_type | Offset: 194, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'unit_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unit type'")
    data_raw |= (field_value & 0x1) << 194
    # integrated_display | Offset: 195, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'integrated_display'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Integrated Display'")
    data_raw |= (field_value & 0x1) << 195
    # dsc | Offset: 196, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'dsc'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DSC'")
    data_raw |= (field_value & 0x1) << 196
    # band | Offset: 197, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_BAND(f.value) for f in nmea2000Message.fields if f.id == 'band'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Band'")
    data_raw |= (field_value & 0x1) << 197
    # can_handle_msg_22 | Offset: 198, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'can_handle_msg_22'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Can handle Msg 22'")
    data_raw |= (field_value & 0x1) << 198
    # ais_mode | Offset: 199, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MODE(f.value) for f in nmea2000Message.fields if f.id == 'ais_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS mode'")
    data_raw |= (field_value & 0x1) << 199
    # ais_communication_state | Offset: 200, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_COMMUNICATION_STATE(f.value) for f in nmea2000Message.fields if f.id == 'ais_communication_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS communication state'")
    data_raw |= (field_value & 0x1) << 200
    # reserved_201 | Offset: 201, Length: 15, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_201'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7FFF) << 201
    return data_raw


def is_fast_pgn_129040() -> bool:
    """Return True if PGN 129040 is a fast PGN."""
    return True
def decode_pgn_129040(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129040."""
    nmea2000Message = NMEA2000Message(129040, 'aisClassBExtendedPositionReport', 'AIS Class B Extended Position Report')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    user_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    user_id = user_id_raw * 1 if user_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('user_id', 'User ID', "", '', user_id, user_id_raw))

    # longitude | Offset: 40, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    longitude_raw = decode_number((data_raw >> 40) & 0xFFFFFFFF, 32)
    if longitude_raw is not None and longitude_raw & (1 << (32 - 1)):
        longitude_raw -= (1 << 32)
    longitude = longitude_raw * 1e-07 if longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitude', 'Longitude', "", 'deg', longitude, longitude_raw))

    # latitude | Offset: 72, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    latitude_raw = decode_number((data_raw >> 72) & 0xFFFFFFFF, 32)
    if latitude_raw is not None and latitude_raw & (1 << (32 - 1)):
        latitude_raw -= (1 << 32)
    latitude = latitude_raw * 1e-07 if latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('latitude', 'Latitude', "", 'deg', latitude, latitude_raw))

    # position_accuracy | Offset: 104, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    position_accuracy_raw = (data_raw >> 104) & 0x1
    position_accuracy = lookup_POSITION_ACCURACY(position_accuracy_raw)
    nmea2000Message.fields.append(NMEA2000Field('position_accuracy', 'Position Accuracy', "", '', position_accuracy, position_accuracy_raw))

    # raim | Offset: 105, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    raim_raw = (data_raw >> 105) & 0x1
    raim = lookup_RAIM_FLAG(raim_raw)
    nmea2000Message.fields.append(NMEA2000Field('raim', 'RAIM', "", '', raim, raim_raw))

    # time_stamp | Offset: 106, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    time_stamp_raw = (data_raw >> 106) & 0x3F
    time_stamp = lookup_TIME_STAMP(time_stamp_raw)
    nmea2000Message.fields.append(NMEA2000Field('time_stamp', 'Time Stamp', "", '', time_stamp, time_stamp_raw))

    # cog | Offset: 112, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    cog_raw = decode_number((data_raw >> 112) & 0xFFFF, 16)
    cog = cog_raw * 0.0001 if cog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('cog', 'COG', "", 'rad', cog, cog_raw))

    # sog | Offset: 128, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    sog_raw = decode_number((data_raw >> 128) & 0xFFFF, 16)
    sog = sog_raw * 0.01 if sog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sog', 'SOG', "", 'm/s', sog, sog_raw))

    # regional_application | Offset: 144, Length: 8, Resolution: 1, Field Type: SPARE, Match: 
    regional_application_raw = (data_raw >> 144) & 0xFF
    regional_application = regional_application_raw * 1 if regional_application_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('regional_application', 'Regional Application', "", '', regional_application, regional_application_raw))

    # regional_application_b | Offset: 152, Length: 4, Resolution: 1, Field Type: SPARE, Match: 
    regional_application_b_raw = (data_raw >> 152) & 0xF
    regional_application_b = regional_application_b_raw * 1 if regional_application_b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('regional_application_b', 'Regional Application B', "", '', regional_application_b, regional_application_b_raw))

    # reserved_156 | Offset: 156, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_156_raw = (data_raw >> 156) & 0xF
    reserved_156 = reserved_156_raw * 1 if reserved_156_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_156', 'Reserved', "", '', reserved_156, reserved_156_raw))

    # type_of_ship | Offset: 160, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    type_of_ship_raw = (data_raw >> 160) & 0xFF
    type_of_ship = lookup_SHIP_TYPE(type_of_ship_raw)
    nmea2000Message.fields.append(NMEA2000Field('type_of_ship', 'Type of ship', "", '', type_of_ship, type_of_ship_raw))

    # true_heading | Offset: 168, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    true_heading_raw = decode_number((data_raw >> 168) & 0xFFFF, 16)
    true_heading = true_heading_raw * 0.0001 if true_heading_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('true_heading', 'True Heading', "", 'rad', true_heading, true_heading_raw))

    # reserved_184 | Offset: 184, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_184_raw = (data_raw >> 184) & 0xF
    reserved_184 = reserved_184_raw * 1 if reserved_184_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_184', 'Reserved', "", '', reserved_184, reserved_184_raw))

    # gnss_type | Offset: 188, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    gnss_type_raw = (data_raw >> 188) & 0xF
    gnss_type = lookup_POSITION_FIX_DEVICE(gnss_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('gnss_type', 'GNSS type', "", '', gnss_type, gnss_type_raw))

    # length | Offset: 192, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    length_raw = decode_number((data_raw >> 192) & 0xFFFF, 16)
    length = length_raw * 0.1 if length_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('length', 'Length', "", 'm', length, length_raw))

    # beam | Offset: 208, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    beam_raw = decode_number((data_raw >> 208) & 0xFFFF, 16)
    beam = beam_raw * 0.1 if beam_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('beam', 'Beam', "", 'm', beam, beam_raw))

    # position_reference_from_starboard | Offset: 224, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    position_reference_from_starboard_raw = decode_number((data_raw >> 224) & 0xFFFF, 16)
    position_reference_from_starboard = position_reference_from_starboard_raw * 0.1 if position_reference_from_starboard_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('position_reference_from_starboard', 'Position reference from Starboard', "", 'm', position_reference_from_starboard, position_reference_from_starboard_raw))

    # position_reference_from_bow | Offset: 240, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    position_reference_from_bow_raw = decode_number((data_raw >> 240) & 0xFFFF, 16)
    position_reference_from_bow = position_reference_from_bow_raw * 0.1 if position_reference_from_bow_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('position_reference_from_bow', 'Position reference from Bow', "", 'm', position_reference_from_bow, position_reference_from_bow_raw))

    # name | Offset: 256, Length: 160, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # dte | Offset: 416, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    dte_raw = (data_raw >> 416) & 0x1
    dte = lookup_AVAILABLE(dte_raw)
    nmea2000Message.fields.append(NMEA2000Field('dte', 'DTE', "", '', dte, dte_raw))

    # ais_mode | Offset: 417, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_mode_raw = (data_raw >> 417) & 0x1
    ais_mode = lookup_AIS_MODE(ais_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_mode', 'AIS mode', "", '', ais_mode, ais_mode_raw))

    # spare | Offset: 418, Length: 4, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 418) & 0xF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # ais_transceiver_information | Offset: 422, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 422) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # reserved_427 | Offset: 427, Length: 5, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_427_raw = (data_raw >> 427) & 0x1F
    reserved_427 = reserved_427_raw * 1 if reserved_427_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_427', 'Reserved', "", '', reserved_427, reserved_427_raw))

    return nmea2000Message

def encode_pgn_129040(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129040."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'user_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'User ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # longitude | Offset: 40, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 40
    
    # latitude | Offset: 72, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 72
    
    # position_accuracy | Offset: 104, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POSITION_ACCURACY(f.value) for f in nmea2000Message.fields if f.id == 'position_accuracy'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Accuracy'")
    data_raw |= (field_value & 0x1) << 104
    # raim | Offset: 105, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RAIM_FLAG(f.value) for f in nmea2000Message.fields if f.id == 'raim'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'RAIM'")
    data_raw |= (field_value & 0x1) << 105
    # time_stamp | Offset: 106, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TIME_STAMP(f.value) for f in nmea2000Message.fields if f.id == 'time_stamp'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time Stamp'")
    data_raw |= (field_value & 0x3F) << 106
    # cog | Offset: 112, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'cog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'COG'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 112
    
    # sog | Offset: 128, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SOG'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 128
    
    # regional_application | Offset: 144, Length: 8, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'regional_application'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Regional Application'")
    data_raw |= (field_value & 0xFF) << 144
    # regional_application_b | Offset: 152, Length: 4, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'regional_application_b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Regional Application B'")
    data_raw |= (field_value & 0xF) << 152
    # reserved_156 | Offset: 156, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_156'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 156
    # type_of_ship | Offset: 160, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SHIP_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'type_of_ship'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Type of ship'")
    data_raw |= (field_value & 0xFF) << 160
    # true_heading | Offset: 168, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'true_heading'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'True Heading'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 168
    
    # reserved_184 | Offset: 184, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_184'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 184
    # gnss_type | Offset: 188, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POSITION_FIX_DEVICE(f.value) for f in nmea2000Message.fields if f.id == 'gnss_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'GNSS type'")
    data_raw |= (field_value & 0xF) << 188
    # length | Offset: 192, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'length'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Length'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 192
    
    # beam | Offset: 208, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'beam'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Beam'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 208
    
    # position_reference_from_starboard | Offset: 224, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_reference_from_starboard'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position reference from Starboard'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 224
    
    # position_reference_from_bow | Offset: 240, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_reference_from_bow'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position reference from Bow'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 240
    
    # name | Offset: 256, Length: 160, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Name'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 256
    # dte | Offset: 416, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AVAILABLE(f.value) for f in nmea2000Message.fields if f.id == 'dte'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DTE'")
    data_raw |= (field_value & 0x1) << 416
    # ais_mode | Offset: 417, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MODE(f.value) for f in nmea2000Message.fields if f.id == 'ais_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS mode'")
    data_raw |= (field_value & 0x1) << 417
    # spare | Offset: 418, Length: 4, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xF) << 418
    # ais_transceiver_information | Offset: 422, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 422
    # reserved_427 | Offset: 427, Length: 5, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_427'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1F) << 427
    return data_raw


def is_fast_pgn_129041() -> bool:
    """Return True if PGN 129041 is a fast PGN."""
    return True
def decode_pgn_129041(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129041."""
    nmea2000Message = NMEA2000Message(129041, 'aisAidsToNavigationAtonReport', 'AIS Aids to Navigation (AtoN) Report')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    user_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    user_id = user_id_raw * 1 if user_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('user_id', 'User ID', "", '', user_id, user_id_raw))

    # longitude | Offset: 40, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    longitude_raw = decode_number((data_raw >> 40) & 0xFFFFFFFF, 32)
    if longitude_raw is not None and longitude_raw & (1 << (32 - 1)):
        longitude_raw -= (1 << 32)
    longitude = longitude_raw * 1e-07 if longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitude', 'Longitude', "", 'deg', longitude, longitude_raw))

    # latitude | Offset: 72, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    latitude_raw = decode_number((data_raw >> 72) & 0xFFFFFFFF, 32)
    if latitude_raw is not None and latitude_raw & (1 << (32 - 1)):
        latitude_raw -= (1 << 32)
    latitude = latitude_raw * 1e-07 if latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('latitude', 'Latitude', "", 'deg', latitude, latitude_raw))

    # position_accuracy | Offset: 104, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    position_accuracy_raw = (data_raw >> 104) & 0x1
    position_accuracy = lookup_POSITION_ACCURACY(position_accuracy_raw)
    nmea2000Message.fields.append(NMEA2000Field('position_accuracy', 'Position Accuracy', "", '', position_accuracy, position_accuracy_raw))

    # raim | Offset: 105, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    raim_raw = (data_raw >> 105) & 0x1
    raim = lookup_RAIM_FLAG(raim_raw)
    nmea2000Message.fields.append(NMEA2000Field('raim', 'RAIM', "", '', raim, raim_raw))

    # time_stamp | Offset: 106, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    time_stamp_raw = (data_raw >> 106) & 0x3F
    time_stamp = lookup_TIME_STAMP(time_stamp_raw)
    nmea2000Message.fields.append(NMEA2000Field('time_stamp', 'Time Stamp', "", '', time_stamp, time_stamp_raw))

    # length_diameter | Offset: 112, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    length_diameter_raw = decode_number((data_raw >> 112) & 0xFFFF, 16)
    length_diameter = length_diameter_raw * 0.1 if length_diameter_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('length_diameter', 'Length/Diameter', "", 'm', length_diameter, length_diameter_raw))

    # beam_diameter | Offset: 128, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    beam_diameter_raw = decode_number((data_raw >> 128) & 0xFFFF, 16)
    beam_diameter = beam_diameter_raw * 0.1 if beam_diameter_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('beam_diameter', 'Beam/Diameter', "", 'm', beam_diameter, beam_diameter_raw))

    # position_reference_from_starboard_edge | Offset: 144, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    position_reference_from_starboard_edge_raw = decode_number((data_raw >> 144) & 0xFFFF, 16)
    position_reference_from_starboard_edge = position_reference_from_starboard_edge_raw * 0.1 if position_reference_from_starboard_edge_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('position_reference_from_starboard_edge', 'Position Reference from Starboard Edge', "", 'm', position_reference_from_starboard_edge, position_reference_from_starboard_edge_raw))

    # position_reference_from_true_north_facing_edge | Offset: 160, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    position_reference_from_true_north_facing_edge_raw = decode_number((data_raw >> 160) & 0xFFFF, 16)
    position_reference_from_true_north_facing_edge = position_reference_from_true_north_facing_edge_raw * 0.1 if position_reference_from_true_north_facing_edge_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('position_reference_from_true_north_facing_edge', 'Position Reference from True North Facing Edge', "", 'm', position_reference_from_true_north_facing_edge, position_reference_from_true_north_facing_edge_raw))

    # aton_type | Offset: 176, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    aton_type_raw = (data_raw >> 176) & 0x1F
    aton_type = lookup_ATON_TYPE(aton_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('aton_type', 'AtoN Type', "", '', aton_type, aton_type_raw))

    # off_position_indicator | Offset: 181, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    off_position_indicator_raw = (data_raw >> 181) & 0x1
    off_position_indicator = lookup_YES_NO(off_position_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('off_position_indicator', 'Off Position Indicator', "", '', off_position_indicator, off_position_indicator_raw))

    # virtual_aton_flag | Offset: 182, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    virtual_aton_flag_raw = (data_raw >> 182) & 0x1
    virtual_aton_flag = lookup_YES_NO(virtual_aton_flag_raw)
    nmea2000Message.fields.append(NMEA2000Field('virtual_aton_flag', 'Virtual AtoN Flag', "", '', virtual_aton_flag, virtual_aton_flag_raw))

    # assigned_mode_flag | Offset: 183, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    assigned_mode_flag_raw = (data_raw >> 183) & 0x1
    assigned_mode_flag = lookup_AIS_ASSIGNED_MODE(assigned_mode_flag_raw)
    nmea2000Message.fields.append(NMEA2000Field('assigned_mode_flag', 'Assigned Mode Flag', "", '', assigned_mode_flag, assigned_mode_flag_raw))

    # spare | Offset: 184, Length: 1, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 184) & 0x1
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # position_fixing_device_type | Offset: 185, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    position_fixing_device_type_raw = (data_raw >> 185) & 0xF
    position_fixing_device_type = lookup_POSITION_FIX_DEVICE(position_fixing_device_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('position_fixing_device_type', 'Position Fixing Device Type', "", '', position_fixing_device_type, position_fixing_device_type_raw))

    # reserved_189 | Offset: 189, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_189_raw = (data_raw >> 189) & 0x7
    reserved_189 = reserved_189_raw * 1 if reserved_189_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_189', 'Reserved', "", '', reserved_189, reserved_189_raw))

    # aton_status | Offset: 192, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    aton_status_raw = (data_raw >> 192) & 0xFF
    aton_status = aton_status_raw * 1 if aton_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('aton_status', 'AtoN Status', "00000000 = default", '', aton_status, aton_status_raw))

    # ais_transceiver_information | Offset: 200, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 200) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # reserved_205 | Offset: 205, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_205_raw = (data_raw >> 205) & 0x7
    reserved_205 = reserved_205_raw * 1 if reserved_205_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_205', 'Reserved', "", '', reserved_205, reserved_205_raw))


    return nmea2000Message

def encode_pgn_129041(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129041."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'user_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'User ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # longitude | Offset: 40, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 40
    
    # latitude | Offset: 72, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 72
    
    # position_accuracy | Offset: 104, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POSITION_ACCURACY(f.value) for f in nmea2000Message.fields if f.id == 'position_accuracy'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Accuracy'")
    data_raw |= (field_value & 0x1) << 104
    # raim | Offset: 105, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RAIM_FLAG(f.value) for f in nmea2000Message.fields if f.id == 'raim'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'RAIM'")
    data_raw |= (field_value & 0x1) << 105
    # time_stamp | Offset: 106, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TIME_STAMP(f.value) for f in nmea2000Message.fields if f.id == 'time_stamp'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time Stamp'")
    data_raw |= (field_value & 0x3F) << 106
    # length_diameter | Offset: 112, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'length_diameter'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Length/Diameter'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 112
    
    # beam_diameter | Offset: 128, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'beam_diameter'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Beam/Diameter'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 128
    
    # position_reference_from_starboard_edge | Offset: 144, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_reference_from_starboard_edge'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Reference from Starboard Edge'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 144
    
    # position_reference_from_true_north_facing_edge | Offset: 160, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_reference_from_true_north_facing_edge'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Reference from True North Facing Edge'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 160
    
    # aton_type | Offset: 176, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ATON_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'aton_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AtoN Type'")
    data_raw |= (field_value & 0x1F) << 176
    # off_position_indicator | Offset: 181, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'off_position_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Off Position Indicator'")
    data_raw |= (field_value & 0x1) << 181
    # virtual_aton_flag | Offset: 182, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'virtual_aton_flag'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Virtual AtoN Flag'")
    data_raw |= (field_value & 0x1) << 182
    # assigned_mode_flag | Offset: 183, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_ASSIGNED_MODE(f.value) for f in nmea2000Message.fields if f.id == 'assigned_mode_flag'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Assigned Mode Flag'")
    data_raw |= (field_value & 0x1) << 183
    # spare | Offset: 184, Length: 1, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0x1) << 184
    # position_fixing_device_type | Offset: 185, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POSITION_FIX_DEVICE(f.value) for f in nmea2000Message.fields if f.id == 'position_fixing_device_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Fixing Device Type'")
    data_raw |= (field_value & 0xF) << 185
    # reserved_189 | Offset: 189, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_189'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 189
    # aton_status | Offset: 192, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'aton_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AtoN Status'")
    data_raw |= (field_value & 0xFF) << 192
    # ais_transceiver_information | Offset: 200, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 200
    # reserved_205 | Offset: 205, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_205'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 205
    raise Exception ("PGN 129041 not supporting encoding for now as AtoN Name is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_129044() -> bool:
    """Return True if PGN 129044 is a fast PGN."""
    return True
def decode_pgn_129044(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129044."""
    nmea2000Message = NMEA2000Message(129044, 'datum', 'Datum')
    # local_datum | Offset: 0, Length: 32, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # delta_latitude | Offset: 32, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    delta_latitude_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if delta_latitude_raw is not None and delta_latitude_raw & (1 << (32 - 1)):
        delta_latitude_raw -= (1 << 32)
    delta_latitude = delta_latitude_raw * 1e-07 if delta_latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('delta_latitude', 'Delta Latitude', "", 'deg', delta_latitude, delta_latitude_raw))

    # delta_longitude | Offset: 64, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    delta_longitude_raw = decode_number((data_raw >> 64) & 0xFFFFFFFF, 32)
    if delta_longitude_raw is not None and delta_longitude_raw & (1 << (32 - 1)):
        delta_longitude_raw -= (1 << 32)
    delta_longitude = delta_longitude_raw * 1e-07 if delta_longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('delta_longitude', 'Delta Longitude', "", 'deg', delta_longitude, delta_longitude_raw))

    # delta_altitude | Offset: 96, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    delta_altitude_raw = decode_number((data_raw >> 96) & 0xFFFFFFFF, 32)
    if delta_altitude_raw is not None and delta_altitude_raw & (1 << (32 - 1)):
        delta_altitude_raw -= (1 << 32)
    delta_altitude = delta_altitude_raw * 0.01 if delta_altitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('delta_altitude', 'Delta Altitude', "", 'm', delta_altitude, delta_altitude_raw))

    # reference_datum | Offset: 128, Length: 32, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_129044(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129044."""
    data_raw = 0
    # local_datum | Offset: 0, Length: 32, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Local Datum'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # delta_latitude | Offset: 32, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'delta_latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Delta Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 32
    
    # delta_longitude | Offset: 64, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'delta_longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Delta Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 64
    
    # delta_altitude | Offset: 96, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'delta_altitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Delta Altitude'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 96
    
    # reference_datum | Offset: 128, Length: 32, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reference Datum'")
    data_raw |= (field_value & 0xFFFFFFFF) << 128
    return data_raw


def is_fast_pgn_129045() -> bool:
    """Return True if PGN 129045 is a fast PGN."""
    return True
def decode_pgn_129045(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129045."""
    nmea2000Message = NMEA2000Message(129045, 'userDatum', 'User Datum')
    # delta_x | Offset: 0, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    delta_x_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if delta_x_raw is not None and delta_x_raw & (1 << (32 - 1)):
        delta_x_raw -= (1 << 32)
    delta_x = delta_x_raw * 0.01 if delta_x_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('delta_x', 'Delta X', "Delta shift in X axis from WGS 84", 'm', delta_x, delta_x_raw))

    # delta_y | Offset: 32, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    delta_y_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if delta_y_raw is not None and delta_y_raw & (1 << (32 - 1)):
        delta_y_raw -= (1 << 32)
    delta_y = delta_y_raw * 0.01 if delta_y_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('delta_y', 'Delta Y', "Delta shift in Y axis from WGS 84", 'm', delta_y, delta_y_raw))

    # delta_z | Offset: 64, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    delta_z_raw = decode_number((data_raw >> 64) & 0xFFFFFFFF, 32)
    if delta_z_raw is not None and delta_z_raw & (1 << (32 - 1)):
        delta_z_raw -= (1 << 32)
    delta_z = delta_z_raw * 0.01 if delta_z_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('delta_z', 'Delta Z', "Delta shift in Z axis from WGS 84", 'm', delta_z, delta_z_raw))

    # rotation_in_x | Offset: 96, Length: 32, Resolution: 1, Field Type: FLOAT, Match: 
    rotation_in_x_raw = decode_float((data_raw >> 96) & 0xFFFFFFFF)
    if rotation_in_x_raw is not None and rotation_in_x_raw & (1 << (32 - 1)):
        rotation_in_x_raw -= (1 << 32)
    rotation_in_x = rotation_in_x_raw * 1 if rotation_in_x_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rotation_in_x', 'Rotation in X', "Rotational shift in X axis from WGS 84. Rotations presented use the geodetic sign convention.  When looking along the positive axis towards the origin, counter-clockwise rotations are positive.", '', rotation_in_x, rotation_in_x_raw))

    # rotation_in_y | Offset: 128, Length: 32, Resolution: 1, Field Type: FLOAT, Match: 
    rotation_in_y_raw = decode_float((data_raw >> 128) & 0xFFFFFFFF)
    if rotation_in_y_raw is not None and rotation_in_y_raw & (1 << (32 - 1)):
        rotation_in_y_raw -= (1 << 32)
    rotation_in_y = rotation_in_y_raw * 1 if rotation_in_y_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rotation_in_y', 'Rotation in Y', "Rotational shift in Y axis from WGS 84. Rotations presented use the geodetic sign convention.  When looking along the positive axis towards the origin, counter-clockwise rotations are positive.", '', rotation_in_y, rotation_in_y_raw))

    # rotation_in_z | Offset: 160, Length: 32, Resolution: 1, Field Type: FLOAT, Match: 
    rotation_in_z_raw = decode_float((data_raw >> 160) & 0xFFFFFFFF)
    if rotation_in_z_raw is not None and rotation_in_z_raw & (1 << (32 - 1)):
        rotation_in_z_raw -= (1 << 32)
    rotation_in_z = rotation_in_z_raw * 1 if rotation_in_z_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rotation_in_z', 'Rotation in Z', "Rotational shift in Z axis from WGS 84. Rotations presented use the geodetic sign convention.  When looking along the positive axis towards the origin, counter-clockwise rotations are positive.", '', rotation_in_z, rotation_in_z_raw))

    # scale | Offset: 192, Length: 32, Resolution: 1, Field Type: FLOAT, Match: 
    scale_raw = decode_float((data_raw >> 192) & 0xFFFFFFFF)
    if scale_raw is not None and scale_raw & (1 << (32 - 1)):
        scale_raw -= (1 << 32)
    scale = scale_raw * 1 if scale_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('scale', 'Scale', "", 'ppm', scale, scale_raw))

    # ellipsoid_semi_major_axis | Offset: 224, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    ellipsoid_semi_major_axis_raw = decode_number((data_raw >> 224) & 0xFFFFFFFF, 32)
    if ellipsoid_semi_major_axis_raw is not None and ellipsoid_semi_major_axis_raw & (1 << (32 - 1)):
        ellipsoid_semi_major_axis_raw -= (1 << 32)
    ellipsoid_semi_major_axis = ellipsoid_semi_major_axis_raw * 0.01 if ellipsoid_semi_major_axis_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ellipsoid_semi_major_axis', 'Ellipsoid Semi-major Axis', "Semi-major axis (a) of the User Datum ellipsoid", 'm', ellipsoid_semi_major_axis, ellipsoid_semi_major_axis_raw))

    # ellipsoid_flattening_inverse | Offset: 256, Length: 32, Resolution: 1, Field Type: FLOAT, Match: 
    ellipsoid_flattening_inverse_raw = decode_float((data_raw >> 256) & 0xFFFFFFFF)
    if ellipsoid_flattening_inverse_raw is not None and ellipsoid_flattening_inverse_raw & (1 << (32 - 1)):
        ellipsoid_flattening_inverse_raw -= (1 << 32)
    ellipsoid_flattening_inverse = ellipsoid_flattening_inverse_raw * 1 if ellipsoid_flattening_inverse_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ellipsoid_flattening_inverse', 'Ellipsoid Flattening Inverse', "Flattening (1/f) of the User Datum ellipsoid", '', ellipsoid_flattening_inverse, ellipsoid_flattening_inverse_raw))

    # datum_name | Offset: 288, Length: 32, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_129045(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129045."""
    data_raw = 0
    # delta_x | Offset: 0, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'delta_x'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Delta X'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 0
    
    # delta_y | Offset: 32, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'delta_y'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Delta Y'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 32
    
    # delta_z | Offset: 64, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'delta_z'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Delta Z'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 64
    
    # rotation_in_x | Offset: 96, Length: 32, Resolution: 1, Field Type: FLOAT
    field_value = next((encode_float(f.value) for f in nmea2000Message.fields if f.id == 'rotation_in_x'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rotation in X'")
    data_raw |= (field_value & 0xFFFFFFFF) << 96
    # rotation_in_y | Offset: 128, Length: 32, Resolution: 1, Field Type: FLOAT
    field_value = next((encode_float(f.value) for f in nmea2000Message.fields if f.id == 'rotation_in_y'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rotation in Y'")
    data_raw |= (field_value & 0xFFFFFFFF) << 128
    # rotation_in_z | Offset: 160, Length: 32, Resolution: 1, Field Type: FLOAT
    field_value = next((encode_float(f.value) for f in nmea2000Message.fields if f.id == 'rotation_in_z'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rotation in Z'")
    data_raw |= (field_value & 0xFFFFFFFF) << 160
    # scale | Offset: 192, Length: 32, Resolution: 1, Field Type: FLOAT
    field_value = next((encode_float(f.value) for f in nmea2000Message.fields if f.id == 'scale'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Scale'")
    data_raw |= (field_value & 0xFFFFFFFF) << 192
    # ellipsoid_semi_major_axis | Offset: 224, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ellipsoid_semi_major_axis'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Ellipsoid Semi-major Axis'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 224
    
    # ellipsoid_flattening_inverse | Offset: 256, Length: 32, Resolution: 1, Field Type: FLOAT
    field_value = next((encode_float(f.value) for f in nmea2000Message.fields if f.id == 'ellipsoid_flattening_inverse'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Ellipsoid Flattening Inverse'")
    data_raw |= (field_value & 0xFFFFFFFF) << 256
    # datum_name | Offset: 288, Length: 32, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Datum Name'")
    data_raw |= (field_value & 0xFFFFFFFF) << 288
    return data_raw


def is_fast_pgn_129283() -> bool:
    """Return True if PGN 129283 is a fast PGN."""
    return False
def decode_pgn_129283(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129283."""
    nmea2000Message = NMEA2000Message(129283, 'crossTrackError', 'Cross Track Error')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # xte_mode | Offset: 8, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    xte_mode_raw = (data_raw >> 8) & 0xF
    xte_mode = lookup_RESIDUAL_MODE(xte_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('xte_mode', 'XTE mode', "", '', xte_mode, xte_mode_raw))

    # reserved_12 | Offset: 12, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_12_raw = (data_raw >> 12) & 0x3
    reserved_12 = reserved_12_raw * 1 if reserved_12_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_12', 'Reserved', "", '', reserved_12, reserved_12_raw))

    # navigation_terminated | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    navigation_terminated_raw = (data_raw >> 14) & 0x3
    navigation_terminated = lookup_YES_NO(navigation_terminated_raw)
    nmea2000Message.fields.append(NMEA2000Field('navigation_terminated', 'Navigation Terminated', "", '', navigation_terminated, navigation_terminated_raw))

    # xte | Offset: 16, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    xte_raw = decode_number((data_raw >> 16) & 0xFFFFFFFF, 32)
    if xte_raw is not None and xte_raw & (1 << (32 - 1)):
        xte_raw -= (1 << 32)
    xte = xte_raw * 0.01 if xte_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('xte', 'XTE', "", 'm', xte, xte_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_129283(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129283."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # xte_mode | Offset: 8, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RESIDUAL_MODE(f.value) for f in nmea2000Message.fields if f.id == 'xte_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'XTE mode'")
    data_raw |= (field_value & 0xF) << 8
    # reserved_12 | Offset: 12, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_12'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 12
    # navigation_terminated | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'navigation_terminated'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Navigation Terminated'")
    data_raw |= (field_value & 0x3) << 14
    # xte | Offset: 16, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'xte'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'XTE'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 16
    
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_129284() -> bool:
    """Return True if PGN 129284 is a fast PGN."""
    return True
def decode_pgn_129284(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129284."""
    nmea2000Message = NMEA2000Message(129284, 'navigationData', 'Navigation Data')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # distance_to_waypoint | Offset: 8, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    distance_to_waypoint_raw = decode_number((data_raw >> 8) & 0xFFFFFFFF, 32)
    distance_to_waypoint = distance_to_waypoint_raw * 0.01 if distance_to_waypoint_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('distance_to_waypoint', 'Distance to Waypoint', "", 'm', distance_to_waypoint, distance_to_waypoint_raw))

    # course_bearing_reference | Offset: 40, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    course_bearing_reference_raw = (data_raw >> 40) & 0x3
    course_bearing_reference = lookup_DIRECTION_REFERENCE(course_bearing_reference_raw)
    nmea2000Message.fields.append(NMEA2000Field('course_bearing_reference', 'Course/Bearing reference', "", '', course_bearing_reference, course_bearing_reference_raw))

    # perpendicular_crossed | Offset: 42, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    perpendicular_crossed_raw = (data_raw >> 42) & 0x3
    perpendicular_crossed = lookup_YES_NO(perpendicular_crossed_raw)
    nmea2000Message.fields.append(NMEA2000Field('perpendicular_crossed', 'Perpendicular Crossed', "", '', perpendicular_crossed, perpendicular_crossed_raw))

    # arrival_circle_entered | Offset: 44, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    arrival_circle_entered_raw = (data_raw >> 44) & 0x3
    arrival_circle_entered = lookup_YES_NO(arrival_circle_entered_raw)
    nmea2000Message.fields.append(NMEA2000Field('arrival_circle_entered', 'Arrival Circle Entered', "", '', arrival_circle_entered, arrival_circle_entered_raw))

    # calculation_type | Offset: 46, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    calculation_type_raw = (data_raw >> 46) & 0x3
    calculation_type = lookup_BEARING_MODE(calculation_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('calculation_type', 'Calculation Type', "", '', calculation_type, calculation_type_raw))

    # eta_time | Offset: 48, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    eta_time_raw = (data_raw >> 48) & 0xFFFFFFFF
    eta_time = decode_time(eta_time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('eta_time', 'ETA Time', "Seconds since midnight", 's', eta_time, eta_time_raw))

    # eta_date | Offset: 80, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    eta_date_raw = (data_raw >> 80) & 0xFFFF
    eta_date = decode_date(eta_date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('eta_date', 'ETA Date', "", 'd', eta_date, eta_date_raw))

    # bearing__origin_to_destination_waypoint | Offset: 96, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    bearing__origin_to_destination_waypoint_raw = decode_number((data_raw >> 96) & 0xFFFF, 16)
    bearing__origin_to_destination_waypoint = bearing__origin_to_destination_waypoint_raw * 0.0001 if bearing__origin_to_destination_waypoint_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('bearing__origin_to_destination_waypoint', 'Bearing, Origin to Destination Waypoint', "", 'rad', bearing__origin_to_destination_waypoint, bearing__origin_to_destination_waypoint_raw))

    # bearing__position_to_destination_waypoint | Offset: 112, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    bearing__position_to_destination_waypoint_raw = decode_number((data_raw >> 112) & 0xFFFF, 16)
    bearing__position_to_destination_waypoint = bearing__position_to_destination_waypoint_raw * 0.0001 if bearing__position_to_destination_waypoint_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('bearing__position_to_destination_waypoint', 'Bearing, Position to Destination Waypoint', "", 'rad', bearing__position_to_destination_waypoint, bearing__position_to_destination_waypoint_raw))

    # origin_waypoint_number | Offset: 128, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    origin_waypoint_number_raw = decode_number((data_raw >> 128) & 0xFFFFFFFF, 32)
    origin_waypoint_number = origin_waypoint_number_raw * 1 if origin_waypoint_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('origin_waypoint_number', 'Origin Waypoint Number', "", '', origin_waypoint_number, origin_waypoint_number_raw))

    # destination_waypoint_number | Offset: 160, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    destination_waypoint_number_raw = decode_number((data_raw >> 160) & 0xFFFFFFFF, 32)
    destination_waypoint_number = destination_waypoint_number_raw * 1 if destination_waypoint_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('destination_waypoint_number', 'Destination Waypoint Number', "", '', destination_waypoint_number, destination_waypoint_number_raw))

    # destination_latitude | Offset: 192, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    destination_latitude_raw = decode_number((data_raw >> 192) & 0xFFFFFFFF, 32)
    if destination_latitude_raw is not None and destination_latitude_raw & (1 << (32 - 1)):
        destination_latitude_raw -= (1 << 32)
    destination_latitude = destination_latitude_raw * 1e-07 if destination_latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('destination_latitude', 'Destination Latitude', "", 'deg', destination_latitude, destination_latitude_raw))

    # destination_longitude | Offset: 224, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    destination_longitude_raw = decode_number((data_raw >> 224) & 0xFFFFFFFF, 32)
    if destination_longitude_raw is not None and destination_longitude_raw & (1 << (32 - 1)):
        destination_longitude_raw -= (1 << 32)
    destination_longitude = destination_longitude_raw * 1e-07 if destination_longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('destination_longitude', 'Destination Longitude', "", 'deg', destination_longitude, destination_longitude_raw))

    # waypoint_closing_velocity | Offset: 256, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    waypoint_closing_velocity_raw = decode_number((data_raw >> 256) & 0xFFFF, 16)
    if waypoint_closing_velocity_raw is not None and waypoint_closing_velocity_raw & (1 << (16 - 1)):
        waypoint_closing_velocity_raw -= (1 << 16)
    waypoint_closing_velocity = waypoint_closing_velocity_raw * 0.01 if waypoint_closing_velocity_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('waypoint_closing_velocity', 'Waypoint Closing Velocity', "", 'm/s', waypoint_closing_velocity, waypoint_closing_velocity_raw))

    return nmea2000Message

def encode_pgn_129284(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129284."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # distance_to_waypoint | Offset: 8, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'distance_to_waypoint'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Distance to Waypoint'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 8
    
    # course_bearing_reference | Offset: 40, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIRECTION_REFERENCE(f.value) for f in nmea2000Message.fields if f.id == 'course_bearing_reference'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Course/Bearing reference'")
    data_raw |= (field_value & 0x3) << 40
    # perpendicular_crossed | Offset: 42, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'perpendicular_crossed'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Perpendicular Crossed'")
    data_raw |= (field_value & 0x3) << 42
    # arrival_circle_entered | Offset: 44, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'arrival_circle_entered'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Arrival Circle Entered'")
    data_raw |= (field_value & 0x3) << 44
    # calculation_type | Offset: 46, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_BEARING_MODE(f.value) for f in nmea2000Message.fields if f.id == 'calculation_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Calculation Type'")
    data_raw |= (field_value & 0x3) << 46
    # eta_time | Offset: 48, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'eta_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ETA Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 48
    
    # eta_date | Offset: 80, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'eta_date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ETA Date'")
    data_raw |= (field_value & 0xFFFF) << 80
    # bearing__origin_to_destination_waypoint | Offset: 96, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'bearing__origin_to_destination_waypoint'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Bearing, Origin to Destination Waypoint'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 96
    
    # bearing__position_to_destination_waypoint | Offset: 112, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'bearing__position_to_destination_waypoint'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Bearing, Position to Destination Waypoint'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 112
    
    # origin_waypoint_number | Offset: 128, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'origin_waypoint_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Origin Waypoint Number'")
    data_raw |= (field_value & 0xFFFFFFFF) << 128
    # destination_waypoint_number | Offset: 160, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'destination_waypoint_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination Waypoint Number'")
    data_raw |= (field_value & 0xFFFFFFFF) << 160
    # destination_latitude | Offset: 192, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'destination_latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 192
    
    # destination_longitude | Offset: 224, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'destination_longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 224
    
    # waypoint_closing_velocity | Offset: 256, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'waypoint_closing_velocity'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Waypoint Closing Velocity'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 256
    
    return data_raw


def is_fast_pgn_129285() -> bool:
    """Return True if PGN 129285 is a fast PGN."""
    return True
def decode_pgn_129285(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129285."""
    nmea2000Message = NMEA2000Message(129285, 'navigationRouteWpInformation', 'Navigation - Route/WP Information')
    # start_rps_ | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    start_rps__raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    start_rps_ = start_rps__raw * 1 if start_rps__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('start_rps_', 'Start RPS#', "", '', start_rps_, start_rps__raw))

    # nitems | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    nitems_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    nitems = nitems_raw * 1 if nitems_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('nitems', 'nItems', "", '', nitems, nitems_raw))

    # database_id | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    database_id_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    database_id = database_id_raw * 1 if database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('database_id', 'Database ID', "", '', database_id, database_id_raw))

    # route_id | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    route_id_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    route_id = route_id_raw * 1 if route_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('route_id', 'Route ID', "", '', route_id, route_id_raw))

    # navigation_direction_in_route | Offset: 64, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    navigation_direction_in_route_raw = (data_raw >> 64) & 0x7
    navigation_direction_in_route = lookup_DIRECTION(navigation_direction_in_route_raw)
    nmea2000Message.fields.append(NMEA2000Field('navigation_direction_in_route', 'Navigation direction in route', "", '', navigation_direction_in_route, navigation_direction_in_route_raw))

    # supplementary_route_wp_data_available | Offset: 67, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    supplementary_route_wp_data_available_raw = (data_raw >> 67) & 0x3
    supplementary_route_wp_data_available = lookup_OFF_ON(supplementary_route_wp_data_available_raw)
    nmea2000Message.fields.append(NMEA2000Field('supplementary_route_wp_data_available', 'Supplementary Route/WP data available', "", '', supplementary_route_wp_data_available, supplementary_route_wp_data_available_raw))

    # reserved_69 | Offset: 69, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_69_raw = (data_raw >> 69) & 0x7
    reserved_69 = reserved_69_raw * 1 if reserved_69_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_69', 'Reserved', "", '', reserved_69, reserved_69_raw))







    return nmea2000Message

def encode_pgn_129285(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129285."""
    data_raw = 0
    # start_rps_ | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_rps_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start RPS#'")
    data_raw |= (field_value & 0xFFFF) << 0
    # nitems | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'nitems'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'nItems'")
    data_raw |= (field_value & 0xFFFF) << 16
    # database_id | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Database ID'")
    data_raw |= (field_value & 0xFFFF) << 32
    # route_id | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'route_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Route ID'")
    data_raw |= (field_value & 0xFFFF) << 48
    # navigation_direction_in_route | Offset: 64, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIRECTION(f.value) for f in nmea2000Message.fields if f.id == 'navigation_direction_in_route'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Navigation direction in route'")
    data_raw |= (field_value & 0x7) << 64
    # supplementary_route_wp_data_available | Offset: 67, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'supplementary_route_wp_data_available'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Supplementary Route/WP data available'")
    data_raw |= (field_value & 0x3) << 67
    # reserved_69 | Offset: 69, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_69'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 69
    raise Exception ("PGN 129285 not supporting encoding for now as Route Name is missing BitLength or BitOffset")
    raise Exception ("PGN 129285 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    raise Exception ("PGN 129285 not supporting encoding for now as WP ID is missing BitLength or BitOffset")
    raise Exception ("PGN 129285 not supporting encoding for now as WP Name is missing BitLength or BitOffset")
    raise Exception ("PGN 129285 not supporting encoding for now as WP Latitude is missing BitLength or BitOffset")
    raise Exception ("PGN 129285 not supporting encoding for now as WP Longitude is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_129291() -> bool:
    """Return True if PGN 129291 is a fast PGN."""
    return False
def decode_pgn_129291(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129291."""
    nmea2000Message = NMEA2000Message(129291, 'setDriftRapidUpdate', 'Set & Drift, Rapid Update')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # set_reference | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    set_reference_raw = (data_raw >> 8) & 0x3
    set_reference = lookup_DIRECTION_REFERENCE(set_reference_raw)
    nmea2000Message.fields.append(NMEA2000Field('set_reference', 'Set Reference', "", '', set_reference, set_reference_raw))

    # reserved_10 | Offset: 10, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_10_raw = (data_raw >> 10) & 0x3F
    reserved_10 = reserved_10_raw * 1 if reserved_10_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_10', 'Reserved', "", '', reserved_10, reserved_10_raw))

    # set | Offset: 16, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    set_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    set = set_raw * 0.0001 if set_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('set', 'Set', "", 'rad', set, set_raw))

    # drift | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    drift_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    drift = drift_raw * 0.01 if drift_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('drift', 'Drift', "", 'm/s', drift, drift_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_129291(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129291."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # set_reference | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIRECTION_REFERENCE(f.value) for f in nmea2000Message.fields if f.id == 'set_reference'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Set Reference'")
    data_raw |= (field_value & 0x3) << 8
    # reserved_10 | Offset: 10, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_10'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 10
    # set | Offset: 16, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'set'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Set'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 16
    
    # drift | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'drift'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Drift'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 32
    
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_129301() -> bool:
    """Return True if PGN 129301 is a fast PGN."""
    return True
def decode_pgn_129301(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129301."""
    nmea2000Message = NMEA2000Message(129301, 'navigationRouteTimeToFromMark', 'Navigation - Route / Time to+from Mark')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # time_to_mark | Offset: 8, Length: 32, Resolution: 0.001, Field Type: TIME, Match: 
    time_to_mark_raw = (data_raw >> 8) & 0xFFFFFFFF
    if time_to_mark_raw is not None and time_to_mark_raw & (1 << (32 - 1)):
        time_to_mark_raw -= (1 << 32)
    time_to_mark = decode_time(time_to_mark_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('time_to_mark', 'Time to mark', "negative = elapsed since event, positive = time to go", 's', time_to_mark, time_to_mark_raw))

    # mark_type | Offset: 40, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    mark_type_raw = (data_raw >> 40) & 0xF
    mark_type = lookup_MARK_TYPE(mark_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('mark_type', 'Mark Type', "", '', mark_type, mark_type_raw))

    # reserved_44 | Offset: 44, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_44_raw = (data_raw >> 44) & 0xF
    reserved_44 = reserved_44_raw * 1 if reserved_44_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_44', 'Reserved', "", '', reserved_44, reserved_44_raw))

    # mark_id | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    mark_id_raw = decode_number((data_raw >> 48) & 0xFFFFFFFF, 32)
    mark_id = mark_id_raw * 1 if mark_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('mark_id', 'Mark ID', "", '', mark_id, mark_id_raw))

    return nmea2000Message

def encode_pgn_129301(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129301."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # time_to_mark | Offset: 8, Length: 32, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'time_to_mark'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time to mark'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFFFF) << 8
    
    # mark_type | Offset: 40, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MARK_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'mark_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mark Type'")
    data_raw |= (field_value & 0xF) << 40
    # reserved_44 | Offset: 44, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_44'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 44
    # mark_id | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'mark_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mark ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 48
    return data_raw


def is_fast_pgn_129302() -> bool:
    """Return True if PGN 129302 is a fast PGN."""
    return True
def decode_pgn_129302(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129302."""
    nmea2000Message = NMEA2000Message(129302, 'bearingAndDistanceBetweenTwoMarks', 'Bearing and Distance between two Marks')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # bearing_reference | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    bearing_reference_raw = (data_raw >> 8) & 0x3
    bearing_reference = lookup_DIRECTION_REFERENCE(bearing_reference_raw)
    nmea2000Message.fields.append(NMEA2000Field('bearing_reference', 'Bearing Reference', "", '', bearing_reference, bearing_reference_raw))

    # calculation_type | Offset: 10, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    calculation_type_raw = (data_raw >> 10) & 0x3
    calculation_type = lookup_BEARING_MODE(calculation_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('calculation_type', 'Calculation Type', "", '', calculation_type, calculation_type_raw))

    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_12_raw = (data_raw >> 12) & 0xF
    reserved_12 = reserved_12_raw * 1 if reserved_12_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_12', 'Reserved', "", '', reserved_12, reserved_12_raw))

    # bearing__origin_to_destination | Offset: 16, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    bearing__origin_to_destination_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    bearing__origin_to_destination = bearing__origin_to_destination_raw * 0.0001 if bearing__origin_to_destination_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('bearing__origin_to_destination', 'Bearing, Origin to Destination', "", 'rad', bearing__origin_to_destination, bearing__origin_to_destination_raw))

    # distance | Offset: 32, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    distance_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    distance = distance_raw * 0.01 if distance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('distance', 'Distance', "", 'm', distance, distance_raw))

    # origin_mark_type | Offset: 64, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    origin_mark_type_raw = (data_raw >> 64) & 0xF
    origin_mark_type = lookup_MARK_TYPE(origin_mark_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('origin_mark_type', 'Origin Mark Type', "", '', origin_mark_type, origin_mark_type_raw))

    # destination_mark_type | Offset: 68, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    destination_mark_type_raw = (data_raw >> 68) & 0xF
    destination_mark_type = lookup_MARK_TYPE(destination_mark_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('destination_mark_type', 'Destination Mark Type', "", '', destination_mark_type, destination_mark_type_raw))

    # origin_mark_id | Offset: 72, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    origin_mark_id_raw = decode_number((data_raw >> 72) & 0xFFFFFFFF, 32)
    origin_mark_id = origin_mark_id_raw * 1 if origin_mark_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('origin_mark_id', 'Origin Mark ID', "", '', origin_mark_id, origin_mark_id_raw))

    # destination_mark_id | Offset: 104, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    destination_mark_id_raw = decode_number((data_raw >> 104) & 0xFFFFFFFF, 32)
    destination_mark_id = destination_mark_id_raw * 1 if destination_mark_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('destination_mark_id', 'Destination Mark ID', "", '', destination_mark_id, destination_mark_id_raw))

    return nmea2000Message

def encode_pgn_129302(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129302."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # bearing_reference | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIRECTION_REFERENCE(f.value) for f in nmea2000Message.fields if f.id == 'bearing_reference'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Bearing Reference'")
    data_raw |= (field_value & 0x3) << 8
    # calculation_type | Offset: 10, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_BEARING_MODE(f.value) for f in nmea2000Message.fields if f.id == 'calculation_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Calculation Type'")
    data_raw |= (field_value & 0x3) << 10
    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_12'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 12
    # bearing__origin_to_destination | Offset: 16, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'bearing__origin_to_destination'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Bearing, Origin to Destination'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 16
    
    # distance | Offset: 32, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'distance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Distance'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 32
    
    # origin_mark_type | Offset: 64, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MARK_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'origin_mark_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Origin Mark Type'")
    data_raw |= (field_value & 0xF) << 64
    # destination_mark_type | Offset: 68, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MARK_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'destination_mark_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination Mark Type'")
    data_raw |= (field_value & 0xF) << 68
    # origin_mark_id | Offset: 72, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'origin_mark_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Origin Mark ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 72
    # destination_mark_id | Offset: 104, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'destination_mark_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination Mark ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 104
    return data_raw


def is_fast_pgn_129538() -> bool:
    """Return True if PGN 129538 is a fast PGN."""
    return True
def decode_pgn_129538(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129538."""
    nmea2000Message = NMEA2000Message(129538, 'gnssControlStatus', 'GNSS Control Status')
    # sv_elevation_mask | Offset: 0, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    sv_elevation_mask_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    if sv_elevation_mask_raw is not None and sv_elevation_mask_raw & (1 << (16 - 1)):
        sv_elevation_mask_raw -= (1 << 16)
    sv_elevation_mask = sv_elevation_mask_raw * 0.0001 if sv_elevation_mask_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sv_elevation_mask', 'SV Elevation Mask', "Will not use SV below this elevation", 'rad', sv_elevation_mask, sv_elevation_mask_raw))

    # pdop_mask | Offset: 16, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    pdop_mask_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    if pdop_mask_raw is not None and pdop_mask_raw & (1 << (16 - 1)):
        pdop_mask_raw -= (1 << 16)
    pdop_mask = pdop_mask_raw * 0.01 if pdop_mask_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pdop_mask', 'PDOP Mask', "Will not report position above this PDOP", '', pdop_mask, pdop_mask_raw))

    # pdop_switch | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    pdop_switch_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    if pdop_switch_raw is not None and pdop_switch_raw & (1 << (16 - 1)):
        pdop_switch_raw -= (1 << 16)
    pdop_switch = pdop_switch_raw * 0.01 if pdop_switch_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pdop_switch', 'PDOP Switch', "Will report 2D position above this PDOP", '', pdop_switch, pdop_switch_raw))

    # snr_mask | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    snr_mask_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    if snr_mask_raw is not None and snr_mask_raw & (1 << (16 - 1)):
        snr_mask_raw -= (1 << 16)
    snr_mask = snr_mask_raw * 0.01 if snr_mask_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('snr_mask', 'SNR Mask', "Will not use SV below this SNR", 'dB', snr_mask, snr_mask_raw))

    # gnss_mode__desired_ | Offset: 64, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    gnss_mode__desired__raw = (data_raw >> 64) & 0x7
    gnss_mode__desired_ = lookup_GNSS_MODE(gnss_mode__desired__raw)
    nmea2000Message.fields.append(NMEA2000Field('gnss_mode__desired_', 'GNSS Mode (desired)', "", '', gnss_mode__desired_, gnss_mode__desired__raw))

    # dgnss_mode__desired_ | Offset: 67, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    dgnss_mode__desired__raw = (data_raw >> 67) & 0x7
    dgnss_mode__desired_ = lookup_DGNSS_MODE(dgnss_mode__desired__raw)
    nmea2000Message.fields.append(NMEA2000Field('dgnss_mode__desired_', 'DGNSS Mode (desired)', "", '', dgnss_mode__desired_, dgnss_mode__desired__raw))

    # position_velocity_filter | Offset: 70, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    position_velocity_filter_raw = decode_number((data_raw >> 70) & 0x3, 2)
    position_velocity_filter = position_velocity_filter_raw * 1 if position_velocity_filter_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('position_velocity_filter', 'Position/Velocity Filter', "", '', position_velocity_filter, position_velocity_filter_raw))

    # max_correction_age | Offset: 72, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    max_correction_age_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    max_correction_age = max_correction_age_raw * 1 if max_correction_age_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('max_correction_age', 'Max Correction Age', "", '', max_correction_age, max_correction_age_raw))

    # antenna_altitude_for_2d_mode | Offset: 88, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    antenna_altitude_for_2d_mode_raw = decode_number((data_raw >> 88) & 0xFFFF, 16)
    if antenna_altitude_for_2d_mode_raw is not None and antenna_altitude_for_2d_mode_raw & (1 << (16 - 1)):
        antenna_altitude_for_2d_mode_raw -= (1 << 16)
    antenna_altitude_for_2d_mode = antenna_altitude_for_2d_mode_raw * 0.01 if antenna_altitude_for_2d_mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('antenna_altitude_for_2d_mode', 'Antenna Altitude for 2D Mode', "", 'm', antenna_altitude_for_2d_mode, antenna_altitude_for_2d_mode_raw))

    # use_antenna_altitude_for_2d_mode | Offset: 104, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    use_antenna_altitude_for_2d_mode_raw = (data_raw >> 104) & 0x3
    use_antenna_altitude_for_2d_mode = lookup_YES_NO(use_antenna_altitude_for_2d_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('use_antenna_altitude_for_2d_mode', 'Use Antenna Altitude for 2D Mode', "", '', use_antenna_altitude_for_2d_mode, use_antenna_altitude_for_2d_mode_raw))

    # reserved_106 | Offset: 106, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_106_raw = (data_raw >> 106) & 0x3F
    reserved_106 = reserved_106_raw * 1 if reserved_106_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_106', 'Reserved', "", '', reserved_106, reserved_106_raw))

    return nmea2000Message

def encode_pgn_129538(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129538."""
    data_raw = 0
    # sv_elevation_mask | Offset: 0, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sv_elevation_mask'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SV Elevation Mask'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 0
    
    # pdop_mask | Offset: 16, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pdop_mask'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PDOP Mask'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 16
    
    # pdop_switch | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pdop_switch'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PDOP Switch'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 32
    
    # snr_mask | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'snr_mask'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SNR Mask'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 48
    
    # gnss_mode__desired_ | Offset: 64, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GNSS_MODE(f.value) for f in nmea2000Message.fields if f.id == 'gnss_mode__desired_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'GNSS Mode (desired)'")
    data_raw |= (field_value & 0x7) << 64
    # dgnss_mode__desired_ | Offset: 67, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DGNSS_MODE(f.value) for f in nmea2000Message.fields if f.id == 'dgnss_mode__desired_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DGNSS Mode (desired)'")
    data_raw |= (field_value & 0x7) << 67
    # position_velocity_filter | Offset: 70, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_velocity_filter'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position/Velocity Filter'")
    data_raw |= (field_value & 0x3) << 70
    # max_correction_age | Offset: 72, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'max_correction_age'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Max Correction Age'")
    data_raw |= (field_value & 0xFFFF) << 72
    # antenna_altitude_for_2d_mode | Offset: 88, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'antenna_altitude_for_2d_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Antenna Altitude for 2D Mode'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 88
    
    # use_antenna_altitude_for_2d_mode | Offset: 104, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'use_antenna_altitude_for_2d_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Use Antenna Altitude for 2D Mode'")
    data_raw |= (field_value & 0x3) << 104
    # reserved_106 | Offset: 106, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_106'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 106
    return data_raw


def is_fast_pgn_129539() -> bool:
    """Return True if PGN 129539 is a fast PGN."""
    return False
def decode_pgn_129539(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129539."""
    nmea2000Message = NMEA2000Message(129539, 'gnssDops', 'GNSS DOPs')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # desired_mode | Offset: 8, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    desired_mode_raw = (data_raw >> 8) & 0x7
    desired_mode = lookup_GNSS_MODE(desired_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('desired_mode', 'Desired Mode', "", '', desired_mode, desired_mode_raw))

    # actual_mode | Offset: 11, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    actual_mode_raw = (data_raw >> 11) & 0x7
    actual_mode = lookup_GNSS_MODE(actual_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('actual_mode', 'Actual Mode', "", '', actual_mode, actual_mode_raw))

    # reserved_14 | Offset: 14, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_14_raw = (data_raw >> 14) & 0x3
    reserved_14 = reserved_14_raw * 1 if reserved_14_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_14', 'Reserved', "", '', reserved_14, reserved_14_raw))

    # hdop | Offset: 16, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    hdop_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    if hdop_raw is not None and hdop_raw & (1 << (16 - 1)):
        hdop_raw -= (1 << 16)
    hdop = hdop_raw * 0.01 if hdop_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('hdop', 'HDOP', "Horizontal dilution of precision", '', hdop, hdop_raw))

    # vdop | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    vdop_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    if vdop_raw is not None and vdop_raw & (1 << (16 - 1)):
        vdop_raw -= (1 << 16)
    vdop = vdop_raw * 0.01 if vdop_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('vdop', 'VDOP', "Vertical dilution of precision", '', vdop, vdop_raw))

    # tdop | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    tdop_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    if tdop_raw is not None and tdop_raw & (1 << (16 - 1)):
        tdop_raw -= (1 << 16)
    tdop = tdop_raw * 0.01 if tdop_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('tdop', 'TDOP', "Time dilution of precision", '', tdop, tdop_raw))

    return nmea2000Message

def encode_pgn_129539(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129539."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # desired_mode | Offset: 8, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GNSS_MODE(f.value) for f in nmea2000Message.fields if f.id == 'desired_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Desired Mode'")
    data_raw |= (field_value & 0x7) << 8
    # actual_mode | Offset: 11, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GNSS_MODE(f.value) for f in nmea2000Message.fields if f.id == 'actual_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Actual Mode'")
    data_raw |= (field_value & 0x7) << 11
    # reserved_14 | Offset: 14, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_14'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 14
    # hdop | Offset: 16, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'hdop'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'HDOP'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 16
    
    # vdop | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'vdop'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'VDOP'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 32
    
    # tdop | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'tdop'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'TDOP'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 48
    
    return data_raw


def is_fast_pgn_129540() -> bool:
    """Return True if PGN 129540 is a fast PGN."""
    return True
def decode_pgn_129540(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129540."""
    nmea2000Message = NMEA2000Message(129540, 'gnssSatsInView', 'GNSS Sats in View')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # range_residual_mode | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    range_residual_mode_raw = (data_raw >> 8) & 0x3
    range_residual_mode = lookup_RANGE_RESIDUAL_MODE(range_residual_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('range_residual_mode', 'Range Residual Mode', "", '', range_residual_mode, range_residual_mode_raw))

    # reserved_10 | Offset: 10, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_10_raw = (data_raw >> 10) & 0x3F
    reserved_10 = reserved_10_raw * 1 if reserved_10_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_10', 'Reserved', "", '', reserved_10, reserved_10_raw))

    # sats_in_view | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sats_in_view_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    sats_in_view = sats_in_view_raw * 1 if sats_in_view_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sats_in_view', 'Sats in View', "", '', sats_in_view, sats_in_view_raw))

    # prn | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    prn_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    prn = prn_raw * 1 if prn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('prn', 'PRN', "", '', prn, prn_raw))

    # elevation | Offset: 32, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    elevation_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    if elevation_raw is not None and elevation_raw & (1 << (16 - 1)):
        elevation_raw -= (1 << 16)
    elevation = elevation_raw * 0.0001 if elevation_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('elevation', 'Elevation', "", 'rad', elevation, elevation_raw))

    # azimuth | Offset: 48, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    azimuth_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    azimuth = azimuth_raw * 0.0001 if azimuth_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('azimuth', 'Azimuth', "", 'rad', azimuth, azimuth_raw))

    # snr | Offset: 64, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    snr_raw = decode_number((data_raw >> 64) & 0xFFFF, 16)
    snr = snr_raw * 0.01 if snr_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('snr', 'SNR', "", 'dB', snr, snr_raw))

    # range_residuals | Offset: 80, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    range_residuals_raw = decode_number((data_raw >> 80) & 0xFFFFFFFF, 32)
    if range_residuals_raw is not None and range_residuals_raw & (1 << (32 - 1)):
        range_residuals_raw -= (1 << 32)
    range_residuals = range_residuals_raw * 1 if range_residuals_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('range_residuals', 'Range residuals', "", '', range_residuals, range_residuals_raw))

    # status | Offset: 112, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    status_raw = (data_raw >> 112) & 0xF
    status = lookup_SATELLITE_STATUS(status_raw)
    nmea2000Message.fields.append(NMEA2000Field('status', 'Status', "", '', status, status_raw))

    # reserved_116 | Offset: 116, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_116_raw = (data_raw >> 116) & 0xF
    reserved_116 = reserved_116_raw * 1 if reserved_116_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_116', 'Reserved', "", '', reserved_116, reserved_116_raw))

    return nmea2000Message

def encode_pgn_129540(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129540."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # range_residual_mode | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RANGE_RESIDUAL_MODE(f.value) for f in nmea2000Message.fields if f.id == 'range_residual_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Range Residual Mode'")
    data_raw |= (field_value & 0x3) << 8
    # reserved_10 | Offset: 10, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_10'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 10
    # sats_in_view | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sats_in_view'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sats in View'")
    data_raw |= (field_value & 0xFF) << 16
    # prn | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'prn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PRN'")
    data_raw |= (field_value & 0xFF) << 24
    # elevation | Offset: 32, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elevation'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elevation'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 32
    
    # azimuth | Offset: 48, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'azimuth'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Azimuth'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 48
    
    # snr | Offset: 64, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'snr'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SNR'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 64
    
    # range_residuals | Offset: 80, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'range_residuals'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Range residuals'")
    data_raw |= (field_value & 0xFFFFFFFF) << 80
    # status | Offset: 112, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SATELLITE_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Status'")
    data_raw |= (field_value & 0xF) << 112
    # reserved_116 | Offset: 116, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_116'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 116
    return data_raw


def is_fast_pgn_129541() -> bool:
    """Return True if PGN 129541 is a fast PGN."""
    return True
def decode_pgn_129541(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129541."""
    nmea2000Message = NMEA2000Message(129541, 'gpsAlmanacData', 'GPS Almanac Data')
    # prn | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    prn_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    prn = prn_raw * 1 if prn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('prn', 'PRN', "", '', prn, prn_raw))

    # gps_week_number | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    gps_week_number_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    gps_week_number = gps_week_number_raw * 1 if gps_week_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('gps_week_number', 'GPS Week number', "", '', gps_week_number, gps_week_number_raw))

    # sv_health_bits | Offset: 24, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    sv_health_bits_raw = (data_raw >> 24) & 0xFF
    sv_health_bits = sv_health_bits_raw * 1 if sv_health_bits_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sv_health_bits', 'SV Health Bits', "", '', sv_health_bits, sv_health_bits_raw))

    # eccentricity | Offset: 32, Length: 16, Resolution: 4.76837e-07, Field Type: NUMBER, Match: 
    eccentricity_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    eccentricity = eccentricity_raw * 4.76837e-07 if eccentricity_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('eccentricity', 'Eccentricity', "'e' in table 20-VI in ICD-GPS-200", 'm/m', eccentricity, eccentricity_raw))

    # almanac_reference_time | Offset: 48, Length: 8, Resolution: 4096, Field Type: NUMBER, Match: 
    almanac_reference_time_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    almanac_reference_time = almanac_reference_time_raw * 4096 if almanac_reference_time_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('almanac_reference_time', 'Almanac Reference Time', "'t oa' in table 20-VI in ICD-GPS-200", 's', almanac_reference_time, almanac_reference_time_raw))

    # inclination_angle | Offset: 56, Length: 16, Resolution: 1.90735e-06, Field Type: NUMBER, Match: 
    inclination_angle_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    if inclination_angle_raw is not None and inclination_angle_raw & (1 << (16 - 1)):
        inclination_angle_raw -= (1 << 16)
    inclination_angle = inclination_angle_raw * 1.90735e-06 if inclination_angle_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('inclination_angle', 'Inclination Angle', "'delta i' in table 20-VI in ICD-GPS-200", 'semi-circle', inclination_angle, inclination_angle_raw))

    # rate_of_right_ascension | Offset: 72, Length: 16, Resolution: 3.63798e-12, Field Type: NUMBER, Match: 
    rate_of_right_ascension_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    if rate_of_right_ascension_raw is not None and rate_of_right_ascension_raw & (1 << (16 - 1)):
        rate_of_right_ascension_raw -= (1 << 16)
    rate_of_right_ascension = rate_of_right_ascension_raw * 3.63798e-12 if rate_of_right_ascension_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rate_of_right_ascension', 'Rate of Right Ascension', "'OMEGADOT' in table 20-VI in ICD-GPS-200", 'semi-circle/s', rate_of_right_ascension, rate_of_right_ascension_raw))

    # root_of_semi_major_axis | Offset: 88, Length: 24, Resolution: 0.000488281, Field Type: NUMBER, Match: 
    root_of_semi_major_axis_raw = decode_number((data_raw >> 88) & 0xFFFFFF, 24)
    root_of_semi_major_axis = root_of_semi_major_axis_raw * 0.000488281 if root_of_semi_major_axis_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('root_of_semi_major_axis', 'Root of Semi-major Axis', "'(A)^0.5' in table 20-VI in ICD-GPS-200", 'sqrt(m)', root_of_semi_major_axis, root_of_semi_major_axis_raw))

    # argument_of_perigee | Offset: 112, Length: 24, Resolution: 1.19209e-07, Field Type: NUMBER, Match: 
    argument_of_perigee_raw = decode_number((data_raw >> 112) & 0xFFFFFF, 24)
    if argument_of_perigee_raw is not None and argument_of_perigee_raw & (1 << (24 - 1)):
        argument_of_perigee_raw -= (1 << 24)
    argument_of_perigee = argument_of_perigee_raw * 1.19209e-07 if argument_of_perigee_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('argument_of_perigee', 'Argument of Perigee', "'(OMEGA)0' in table 20-VI in ICD-GPS-200", 'semi-circle', argument_of_perigee, argument_of_perigee_raw))

    # longitude_of_ascension_node | Offset: 136, Length: 24, Resolution: 1.19209e-07, Field Type: NUMBER, Match: 
    longitude_of_ascension_node_raw = decode_number((data_raw >> 136) & 0xFFFFFF, 24)
    if longitude_of_ascension_node_raw is not None and longitude_of_ascension_node_raw & (1 << (24 - 1)):
        longitude_of_ascension_node_raw -= (1 << 24)
    longitude_of_ascension_node = longitude_of_ascension_node_raw * 1.19209e-07 if longitude_of_ascension_node_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitude_of_ascension_node', 'Longitude of Ascension Node', "'small-omega' in table 20-VI in ICD-GPS-200", 'semi-circle', longitude_of_ascension_node, longitude_of_ascension_node_raw))

    # mean_anomaly | Offset: 160, Length: 24, Resolution: 1.19209e-07, Field Type: NUMBER, Match: 
    mean_anomaly_raw = decode_number((data_raw >> 160) & 0xFFFFFF, 24)
    if mean_anomaly_raw is not None and mean_anomaly_raw & (1 << (24 - 1)):
        mean_anomaly_raw -= (1 << 24)
    mean_anomaly = mean_anomaly_raw * 1.19209e-07 if mean_anomaly_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('mean_anomaly', 'Mean Anomaly', "'M 0' in table 20-VI in ICD-GPS-200", 'semi-circle', mean_anomaly, mean_anomaly_raw))

    # clock_parameter_1 | Offset: 184, Length: 11, Resolution: 9.53674e-07, Field Type: NUMBER, Match: 
    clock_parameter_1_raw = decode_number((data_raw >> 184) & 0x7FF, 11)
    if clock_parameter_1_raw is not None and clock_parameter_1_raw & (1 << (11 - 1)):
        clock_parameter_1_raw -= (1 << 11)
    clock_parameter_1 = clock_parameter_1_raw * 9.53674e-07 if clock_parameter_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('clock_parameter_1', 'Clock Parameter 1', "'a f0' in table 20-VI in ICD-GPS-200", 's', clock_parameter_1, clock_parameter_1_raw))

    # clock_parameter_2 | Offset: 195, Length: 11, Resolution: 3.63798e-12, Field Type: NUMBER, Match: 
    clock_parameter_2_raw = decode_number((data_raw >> 195) & 0x7FF, 11)
    if clock_parameter_2_raw is not None and clock_parameter_2_raw & (1 << (11 - 1)):
        clock_parameter_2_raw -= (1 << 11)
    clock_parameter_2 = clock_parameter_2_raw * 3.63798e-12 if clock_parameter_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('clock_parameter_2', 'Clock Parameter 2', "'a f1' in table 20-VI in ICD-GPS-200", 's/s', clock_parameter_2, clock_parameter_2_raw))

    # reserved_206 | Offset: 206, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_206_raw = (data_raw >> 206) & 0x3
    reserved_206 = reserved_206_raw * 1 if reserved_206_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_206', 'Reserved', "", '', reserved_206, reserved_206_raw))

    return nmea2000Message

def encode_pgn_129541(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129541."""
    data_raw = 0
    # prn | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'prn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PRN'")
    data_raw |= (field_value & 0xFF) << 0
    # gps_week_number | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'gps_week_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'GPS Week number'")
    data_raw |= (field_value & 0xFFFF) << 8
    # sv_health_bits | Offset: 24, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sv_health_bits'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SV Health Bits'")
    data_raw |= (field_value & 0xFF) << 24
    # eccentricity | Offset: 32, Length: 16, Resolution: 4.76837e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'eccentricity'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Eccentricity'")        
    data_raw |= (int(field_value / 4.76837e-07) & 0xFFFF) << 32
    
    # almanac_reference_time | Offset: 48, Length: 8, Resolution: 4096, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'almanac_reference_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Almanac Reference Time'")        
    data_raw |= (int(field_value / 4096) & 0xFF) << 48
    
    # inclination_angle | Offset: 56, Length: 16, Resolution: 1.90735e-06, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'inclination_angle'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Inclination Angle'")        
    data_raw |= (int(field_value / 1.90735e-06) & 0xFFFF) << 56
    
    # rate_of_right_ascension | Offset: 72, Length: 16, Resolution: 3.63798e-12, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rate_of_right_ascension'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rate of Right Ascension'")        
    data_raw |= (int(field_value / 3.63798e-12) & 0xFFFF) << 72
    
    # root_of_semi_major_axis | Offset: 88, Length: 24, Resolution: 0.000488281, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'root_of_semi_major_axis'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Root of Semi-major Axis'")        
    data_raw |= (int(field_value / 0.000488281) & 0xFFFFFF) << 88
    
    # argument_of_perigee | Offset: 112, Length: 24, Resolution: 1.19209e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'argument_of_perigee'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Argument of Perigee'")        
    data_raw |= (int(field_value / 1.19209e-07) & 0xFFFFFF) << 112
    
    # longitude_of_ascension_node | Offset: 136, Length: 24, Resolution: 1.19209e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitude_of_ascension_node'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitude of Ascension Node'")        
    data_raw |= (int(field_value / 1.19209e-07) & 0xFFFFFF) << 136
    
    # mean_anomaly | Offset: 160, Length: 24, Resolution: 1.19209e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'mean_anomaly'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mean Anomaly'")        
    data_raw |= (int(field_value / 1.19209e-07) & 0xFFFFFF) << 160
    
    # clock_parameter_1 | Offset: 184, Length: 11, Resolution: 9.53674e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'clock_parameter_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Clock Parameter 1'")        
    data_raw |= (int(field_value / 9.53674e-07) & 0x7FF) << 184
    
    # clock_parameter_2 | Offset: 195, Length: 11, Resolution: 3.63798e-12, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'clock_parameter_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Clock Parameter 2'")        
    data_raw |= (int(field_value / 3.63798e-12) & 0x7FF) << 195
    
    # reserved_206 | Offset: 206, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_206'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 206
    return data_raw


def is_fast_pgn_129542() -> bool:
    """Return True if PGN 129542 is a fast PGN."""
    return True
def decode_pgn_129542(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129542."""
    nmea2000Message = NMEA2000Message(129542, 'gnssPseudorangeNoiseStatistics', 'GNSS Pseudorange Noise Statistics')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # rms_of_position_uncertainty | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    rms_of_position_uncertainty_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    rms_of_position_uncertainty = rms_of_position_uncertainty_raw * 1 if rms_of_position_uncertainty_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rms_of_position_uncertainty', 'RMS of Position Uncertainty', "", '', rms_of_position_uncertainty, rms_of_position_uncertainty_raw))

    # std_of_major_axis | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    std_of_major_axis_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    std_of_major_axis = std_of_major_axis_raw * 1 if std_of_major_axis_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('std_of_major_axis', 'STD of Major axis', "", '', std_of_major_axis, std_of_major_axis_raw))

    # std_of_minor_axis | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    std_of_minor_axis_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    std_of_minor_axis = std_of_minor_axis_raw * 1 if std_of_minor_axis_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('std_of_minor_axis', 'STD of Minor axis', "", '', std_of_minor_axis, std_of_minor_axis_raw))

    # orientation_of_major_axis | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    orientation_of_major_axis_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    orientation_of_major_axis = orientation_of_major_axis_raw * 1 if orientation_of_major_axis_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('orientation_of_major_axis', 'Orientation of Major axis', "", '', orientation_of_major_axis, orientation_of_major_axis_raw))

    # std_of_lat_error | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    std_of_lat_error_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    std_of_lat_error = std_of_lat_error_raw * 1 if std_of_lat_error_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('std_of_lat_error', 'STD of Lat Error', "", '', std_of_lat_error, std_of_lat_error_raw))

    # std_of_lon_error | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    std_of_lon_error_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    std_of_lon_error = std_of_lon_error_raw * 1 if std_of_lon_error_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('std_of_lon_error', 'STD of Lon Error', "", '', std_of_lon_error, std_of_lon_error_raw))

    # std_of_alt_error | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    std_of_alt_error_raw = decode_number((data_raw >> 64) & 0xFF, 8)
    std_of_alt_error = std_of_alt_error_raw * 1 if std_of_alt_error_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('std_of_alt_error', 'STD of Alt Error', "", '', std_of_alt_error, std_of_alt_error_raw))

    return nmea2000Message

def encode_pgn_129542(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129542."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # rms_of_position_uncertainty | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rms_of_position_uncertainty'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'RMS of Position Uncertainty'")
    data_raw |= (field_value & 0xFFFF) << 8
    # std_of_major_axis | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'std_of_major_axis'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'STD of Major axis'")
    data_raw |= (field_value & 0xFF) << 24
    # std_of_minor_axis | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'std_of_minor_axis'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'STD of Minor axis'")
    data_raw |= (field_value & 0xFF) << 32
    # orientation_of_major_axis | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'orientation_of_major_axis'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Orientation of Major axis'")
    data_raw |= (field_value & 0xFF) << 40
    # std_of_lat_error | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'std_of_lat_error'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'STD of Lat Error'")
    data_raw |= (field_value & 0xFF) << 48
    # std_of_lon_error | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'std_of_lon_error'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'STD of Lon Error'")
    data_raw |= (field_value & 0xFF) << 56
    # std_of_alt_error | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'std_of_alt_error'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'STD of Alt Error'")
    data_raw |= (field_value & 0xFF) << 64
    return data_raw


def is_fast_pgn_129545() -> bool:
    """Return True if PGN 129545 is a fast PGN."""
    return True
def decode_pgn_129545(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129545."""
    nmea2000Message = NMEA2000Message(129545, 'gnssRaimOutput', 'GNSS RAIM Output')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # integrity_flag | Offset: 8, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    integrity_flag_raw = decode_number((data_raw >> 8) & 0xF, 4)
    integrity_flag = integrity_flag_raw * 1 if integrity_flag_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('integrity_flag', 'Integrity flag', "", '', integrity_flag, integrity_flag_raw))

    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_12_raw = (data_raw >> 12) & 0xF
    reserved_12 = reserved_12_raw * 1 if reserved_12_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_12', 'Reserved', "", '', reserved_12, reserved_12_raw))

    # latitude_expected_error | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    latitude_expected_error_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    latitude_expected_error = latitude_expected_error_raw * 1 if latitude_expected_error_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('latitude_expected_error', 'Latitude expected error', "", '', latitude_expected_error, latitude_expected_error_raw))

    # longitude_expected_error | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    longitude_expected_error_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    longitude_expected_error = longitude_expected_error_raw * 1 if longitude_expected_error_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitude_expected_error', 'Longitude expected error', "", '', longitude_expected_error, longitude_expected_error_raw))

    # altitude_expected_error | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    altitude_expected_error_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    altitude_expected_error = altitude_expected_error_raw * 1 if altitude_expected_error_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('altitude_expected_error', 'Altitude expected error', "", '', altitude_expected_error, altitude_expected_error_raw))

    # sv_id_of_most_likely_failed_sat | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sv_id_of_most_likely_failed_sat_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    sv_id_of_most_likely_failed_sat = sv_id_of_most_likely_failed_sat_raw * 1 if sv_id_of_most_likely_failed_sat_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sv_id_of_most_likely_failed_sat', 'SV ID of most likely failed sat', "", '', sv_id_of_most_likely_failed_sat, sv_id_of_most_likely_failed_sat_raw))

    # probability_of_missed_detection | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    probability_of_missed_detection_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    probability_of_missed_detection = probability_of_missed_detection_raw * 1 if probability_of_missed_detection_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('probability_of_missed_detection', 'Probability of missed detection', "", '', probability_of_missed_detection, probability_of_missed_detection_raw))

    # estimate_of_pseudorange_bias | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    estimate_of_pseudorange_bias_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    estimate_of_pseudorange_bias = estimate_of_pseudorange_bias_raw * 1 if estimate_of_pseudorange_bias_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('estimate_of_pseudorange_bias', 'Estimate of pseudorange bias', "", '', estimate_of_pseudorange_bias, estimate_of_pseudorange_bias_raw))

    # std_deviation_of_bias | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    std_deviation_of_bias_raw = decode_number((data_raw >> 64) & 0xFF, 8)
    std_deviation_of_bias = std_deviation_of_bias_raw * 1 if std_deviation_of_bias_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('std_deviation_of_bias', 'Std Deviation of bias', "", '', std_deviation_of_bias, std_deviation_of_bias_raw))

    return nmea2000Message

def encode_pgn_129545(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129545."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # integrity_flag | Offset: 8, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'integrity_flag'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Integrity flag'")
    data_raw |= (field_value & 0xF) << 8
    # reserved_12 | Offset: 12, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_12'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 12
    # latitude_expected_error | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'latitude_expected_error'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Latitude expected error'")
    data_raw |= (field_value & 0xFF) << 16
    # longitude_expected_error | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitude_expected_error'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitude expected error'")
    data_raw |= (field_value & 0xFF) << 24
    # altitude_expected_error | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'altitude_expected_error'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Altitude expected error'")
    data_raw |= (field_value & 0xFF) << 32
    # sv_id_of_most_likely_failed_sat | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sv_id_of_most_likely_failed_sat'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SV ID of most likely failed sat'")
    data_raw |= (field_value & 0xFF) << 40
    # probability_of_missed_detection | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'probability_of_missed_detection'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Probability of missed detection'")
    data_raw |= (field_value & 0xFF) << 48
    # estimate_of_pseudorange_bias | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'estimate_of_pseudorange_bias'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Estimate of pseudorange bias'")
    data_raw |= (field_value & 0xFF) << 56
    # std_deviation_of_bias | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'std_deviation_of_bias'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Std Deviation of bias'")
    data_raw |= (field_value & 0xFF) << 64
    return data_raw


def is_fast_pgn_129546() -> bool:
    """Return True if PGN 129546 is a fast PGN."""
    return False
def decode_pgn_129546(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129546."""
    nmea2000Message = NMEA2000Message(129546, 'gnssRaimSettings', 'GNSS RAIM Settings')
    # radial_position_error_maximum_threshold | Offset: 0, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    radial_position_error_maximum_threshold_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    if radial_position_error_maximum_threshold_raw is not None and radial_position_error_maximum_threshold_raw & (1 << (16 - 1)):
        radial_position_error_maximum_threshold_raw -= (1 << 16)
    radial_position_error_maximum_threshold = radial_position_error_maximum_threshold_raw * 0.01 if radial_position_error_maximum_threshold_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('radial_position_error_maximum_threshold', 'Radial Position Error Maximum Threshold', "", 'm', radial_position_error_maximum_threshold, radial_position_error_maximum_threshold_raw))

    # probability_of_false_alarm | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    probability_of_false_alarm_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    if probability_of_false_alarm_raw is not None and probability_of_false_alarm_raw & (1 << (8 - 1)):
        probability_of_false_alarm_raw -= (1 << 8)
    probability_of_false_alarm = probability_of_false_alarm_raw * 1 if probability_of_false_alarm_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('probability_of_false_alarm', 'Probability of False Alarm', "", '%', probability_of_false_alarm, probability_of_false_alarm_raw))

    # probability_of_missed_detection | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    probability_of_missed_detection_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    if probability_of_missed_detection_raw is not None and probability_of_missed_detection_raw & (1 << (8 - 1)):
        probability_of_missed_detection_raw -= (1 << 8)
    probability_of_missed_detection = probability_of_missed_detection_raw * 1 if probability_of_missed_detection_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('probability_of_missed_detection', 'Probability of Missed Detection', "", '%', probability_of_missed_detection, probability_of_missed_detection_raw))

    # pseudorange_residual_filtering_time_constant | Offset: 32, Length: 16, Resolution: 1, Field Type: TIME, Match: 
    pseudorange_residual_filtering_time_constant_raw = (data_raw >> 32) & 0xFFFF
    pseudorange_residual_filtering_time_constant = decode_time(pseudorange_residual_filtering_time_constant_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('pseudorange_residual_filtering_time_constant', 'Pseudorange Residual Filtering Time Constant', "", 's', pseudorange_residual_filtering_time_constant, pseudorange_residual_filtering_time_constant_raw))

    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_48_raw = (data_raw >> 48) & 0xFFFF
    reserved_48 = reserved_48_raw * 1 if reserved_48_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_48', 'Reserved', "", '', reserved_48, reserved_48_raw))

    return nmea2000Message

def encode_pgn_129546(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129546."""
    data_raw = 0
    # radial_position_error_maximum_threshold | Offset: 0, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'radial_position_error_maximum_threshold'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Radial Position Error Maximum Threshold'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 0
    
    # probability_of_false_alarm | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'probability_of_false_alarm'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Probability of False Alarm'")
    data_raw |= (field_value & 0xFF) << 16
    # probability_of_missed_detection | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'probability_of_missed_detection'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Probability of Missed Detection'")
    data_raw |= (field_value & 0xFF) << 24
    # pseudorange_residual_filtering_time_constant | Offset: 32, Length: 16, Resolution: 1, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pseudorange_residual_filtering_time_constant'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Pseudorange Residual Filtering Time Constant'")
    data_raw |= (field_value & 0xFFFF) << 32
    # reserved_48 | Offset: 48, Length: 16, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_48'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFF) << 48
    return data_raw


def is_fast_pgn_129547() -> bool:
    """Return True if PGN 129547 is a fast PGN."""
    return True
def decode_pgn_129547(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129547."""
    nmea2000Message = NMEA2000Message(129547, 'gnssPseudorangeErrorStatistics', 'GNSS Pseudorange Error Statistics')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # rms_std_dev_of_range_inputs | Offset: 8, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    rms_std_dev_of_range_inputs_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    if rms_std_dev_of_range_inputs_raw is not None and rms_std_dev_of_range_inputs_raw & (1 << (16 - 1)):
        rms_std_dev_of_range_inputs_raw -= (1 << 16)
    rms_std_dev_of_range_inputs = rms_std_dev_of_range_inputs_raw * 0.01 if rms_std_dev_of_range_inputs_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rms_std_dev_of_range_inputs', 'RMS Std Dev of Range Inputs', "", 'm', rms_std_dev_of_range_inputs, rms_std_dev_of_range_inputs_raw))

    # std_dev_of_major_error_ellipse | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    std_dev_of_major_error_ellipse_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    if std_dev_of_major_error_ellipse_raw is not None and std_dev_of_major_error_ellipse_raw & (1 << (16 - 1)):
        std_dev_of_major_error_ellipse_raw -= (1 << 16)
    std_dev_of_major_error_ellipse = std_dev_of_major_error_ellipse_raw * 0.01 if std_dev_of_major_error_ellipse_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('std_dev_of_major_error_ellipse', 'Std Dev of Major error ellipse', "", 'm', std_dev_of_major_error_ellipse, std_dev_of_major_error_ellipse_raw))

    # std_dev_of_minor_error_ellipse | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    std_dev_of_minor_error_ellipse_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    if std_dev_of_minor_error_ellipse_raw is not None and std_dev_of_minor_error_ellipse_raw & (1 << (16 - 1)):
        std_dev_of_minor_error_ellipse_raw -= (1 << 16)
    std_dev_of_minor_error_ellipse = std_dev_of_minor_error_ellipse_raw * 0.01 if std_dev_of_minor_error_ellipse_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('std_dev_of_minor_error_ellipse', 'Std Dev of Minor error ellipse', "", 'm', std_dev_of_minor_error_ellipse, std_dev_of_minor_error_ellipse_raw))

    # orientation_of_error_ellipse | Offset: 56, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    orientation_of_error_ellipse_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    orientation_of_error_ellipse = orientation_of_error_ellipse_raw * 0.0001 if orientation_of_error_ellipse_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('orientation_of_error_ellipse', 'Orientation of error ellipse', "", 'rad', orientation_of_error_ellipse, orientation_of_error_ellipse_raw))

    # std_dev_lat_error | Offset: 72, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    std_dev_lat_error_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    if std_dev_lat_error_raw is not None and std_dev_lat_error_raw & (1 << (16 - 1)):
        std_dev_lat_error_raw -= (1 << 16)
    std_dev_lat_error = std_dev_lat_error_raw * 0.01 if std_dev_lat_error_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('std_dev_lat_error', 'Std Dev Lat Error', "", 'm', std_dev_lat_error, std_dev_lat_error_raw))

    # std_dev_lon_error | Offset: 88, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    std_dev_lon_error_raw = decode_number((data_raw >> 88) & 0xFFFF, 16)
    if std_dev_lon_error_raw is not None and std_dev_lon_error_raw & (1 << (16 - 1)):
        std_dev_lon_error_raw -= (1 << 16)
    std_dev_lon_error = std_dev_lon_error_raw * 0.01 if std_dev_lon_error_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('std_dev_lon_error', 'Std Dev Lon Error', "", 'm', std_dev_lon_error, std_dev_lon_error_raw))

    # std_dev_alt_error | Offset: 104, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    std_dev_alt_error_raw = decode_number((data_raw >> 104) & 0xFFFF, 16)
    if std_dev_alt_error_raw is not None and std_dev_alt_error_raw & (1 << (16 - 1)):
        std_dev_alt_error_raw -= (1 << 16)
    std_dev_alt_error = std_dev_alt_error_raw * 0.01 if std_dev_alt_error_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('std_dev_alt_error', 'Std Dev Alt Error', "", 'm', std_dev_alt_error, std_dev_alt_error_raw))

    return nmea2000Message

def encode_pgn_129547(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129547."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # rms_std_dev_of_range_inputs | Offset: 8, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rms_std_dev_of_range_inputs'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'RMS Std Dev of Range Inputs'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 8
    
    # std_dev_of_major_error_ellipse | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'std_dev_of_major_error_ellipse'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Std Dev of Major error ellipse'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 24
    
    # std_dev_of_minor_error_ellipse | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'std_dev_of_minor_error_ellipse'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Std Dev of Minor error ellipse'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 40
    
    # orientation_of_error_ellipse | Offset: 56, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'orientation_of_error_ellipse'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Orientation of error ellipse'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 56
    
    # std_dev_lat_error | Offset: 72, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'std_dev_lat_error'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Std Dev Lat Error'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 72
    
    # std_dev_lon_error | Offset: 88, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'std_dev_lon_error'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Std Dev Lon Error'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 88
    
    # std_dev_alt_error | Offset: 104, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'std_dev_alt_error'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Std Dev Alt Error'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 104
    
    return data_raw


def is_fast_pgn_129549() -> bool:
    """Return True if PGN 129549 is a fast PGN."""
    return True
def decode_pgn_129549(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129549."""
    nmea2000Message = NMEA2000Message(129549, 'dgnssCorrections', 'DGNSS Corrections')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # reference_station_id | Offset: 8, Length: 12, Resolution: 1, Field Type: NUMBER, Match: 
    reference_station_id_raw = decode_number((data_raw >> 8) & 0xFFF, 12)
    reference_station_id = reference_station_id_raw * 1 if reference_station_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reference_station_id', 'Reference Station ID', "", '', reference_station_id, reference_station_id_raw))

    # reference_station_type | Offset: 20, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    reference_station_type_raw = (data_raw >> 20) & 0xF
    reference_station_type = lookup_GNS(reference_station_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('reference_station_type', 'Reference Station Type', "", '', reference_station_type, reference_station_type_raw))

    # time_of_corrections | Offset: 24, Length: 16, Resolution: 0.001, Field Type: TIME, Match: 
    time_of_corrections_raw = (data_raw >> 24) & 0xFFFF
    time_of_corrections = decode_time(time_of_corrections_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('time_of_corrections', 'Time of corrections', "", 's', time_of_corrections, time_of_corrections_raw))

    # station_health | Offset: 40, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    station_health_raw = (data_raw >> 40) & 0xF
    station_health = lookup_STATION_HEALTH(station_health_raw)
    nmea2000Message.fields.append(NMEA2000Field('station_health', 'Station Health', "", '', station_health, station_health_raw))

    # reserved_44 | Offset: 44, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_44_raw = (data_raw >> 44) & 0xF
    reserved_44 = reserved_44_raw * 1 if reserved_44_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_44', 'Reserved', "", '', reserved_44, reserved_44_raw))

    # satellite_id | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    satellite_id_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    satellite_id = satellite_id_raw * 1 if satellite_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('satellite_id', 'Satellite ID', "", '', satellite_id, satellite_id_raw))

    # prc | Offset: 56, Length: 32, Resolution: 0.0001, Field Type: NUMBER, Match: 
    prc_raw = decode_number((data_raw >> 56) & 0xFFFFFFFF, 32)
    if prc_raw is not None and prc_raw & (1 << (32 - 1)):
        prc_raw -= (1 << 32)
    prc = prc_raw * 0.0001 if prc_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('prc', 'PRC', "", 'm', prc, prc_raw))

    # rrc | Offset: 88, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    rrc_raw = decode_number((data_raw >> 88) & 0xFFFF, 16)
    if rrc_raw is not None and rrc_raw & (1 << (16 - 1)):
        rrc_raw -= (1 << 16)
    rrc = rrc_raw * 0.0001 if rrc_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rrc', 'RRC', "", 'm/s', rrc, rrc_raw))

    # udre | Offset: 104, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    udre_raw = decode_number((data_raw >> 104) & 0xFFFF, 16)
    udre = udre_raw * 0.01 if udre_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('udre', 'UDRE', "", 'm', udre, udre_raw))

    # iod | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    iod_raw = decode_number((data_raw >> 120) & 0xFF, 8)
    iod = iod_raw * 1 if iod_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('iod', 'IOD', "", '', iod, iod_raw))

    return nmea2000Message

def encode_pgn_129549(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129549."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # reference_station_id | Offset: 8, Length: 12, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reference_station_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reference Station ID'")
    data_raw |= (field_value & 0xFFF) << 8
    # reference_station_type | Offset: 20, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GNS(f.value) for f in nmea2000Message.fields if f.id == 'reference_station_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reference Station Type'")
    data_raw |= (field_value & 0xF) << 20
    # time_of_corrections | Offset: 24, Length: 16, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'time_of_corrections'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time of corrections'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 24
    
    # station_health | Offset: 40, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_STATION_HEALTH(f.value) for f in nmea2000Message.fields if f.id == 'station_health'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station Health'")
    data_raw |= (field_value & 0xF) << 40
    # reserved_44 | Offset: 44, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_44'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 44
    # satellite_id | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'satellite_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Satellite ID'")
    data_raw |= (field_value & 0xFF) << 48
    # prc | Offset: 56, Length: 32, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'prc'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PRC'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 56
    
    # rrc | Offset: 88, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rrc'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'RRC'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 88
    
    # udre | Offset: 104, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'udre'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'UDRE'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 104
    
    # iod | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'iod'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'IOD'")
    data_raw |= (field_value & 0xFF) << 120
    return data_raw


def is_fast_pgn_129550() -> bool:
    """Return True if PGN 129550 is a fast PGN."""
    return False
def decode_pgn_129550(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129550."""
    nmea2000Message = NMEA2000Message(129550, 'gnssDifferentialCorrectionReceiverInterface', 'GNSS Differential Correction Receiver Interface')
    # channel | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    channel_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    channel = channel_raw * 1 if channel_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('channel', 'Channel', "", '', channel, channel_raw))

    # frequency | Offset: 8, Length: 32, Resolution: 10, Field Type: NUMBER, Match: 
    frequency_raw = decode_number((data_raw >> 8) & 0xFFFFFFFF, 32)
    frequency = frequency_raw * 10 if frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('frequency', 'Frequency', "", 'Hz', frequency, frequency_raw))

    # serial_interface_bit_rate | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    serial_interface_bit_rate_raw = (data_raw >> 40) & 0x1F
    serial_interface_bit_rate = lookup_SERIAL_BIT_RATE(serial_interface_bit_rate_raw)
    nmea2000Message.fields.append(NMEA2000Field('serial_interface_bit_rate', 'Serial Interface Bit Rate', "", '', serial_interface_bit_rate, serial_interface_bit_rate_raw))

    # serial_interface_detection_mode | Offset: 45, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    serial_interface_detection_mode_raw = (data_raw >> 45) & 0x7
    serial_interface_detection_mode = lookup_SERIAL_DETECTION_MODE(serial_interface_detection_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('serial_interface_detection_mode', 'Serial Interface Detection Mode', "", '', serial_interface_detection_mode, serial_interface_detection_mode_raw))

    # differential_source | Offset: 48, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    differential_source_raw = (data_raw >> 48) & 0xF
    differential_source = lookup_DIFFERENTIAL_SOURCE(differential_source_raw)
    nmea2000Message.fields.append(NMEA2000Field('differential_source', 'Differential Source', "", '', differential_source, differential_source_raw))

    # differential_operation_mode | Offset: 52, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    differential_operation_mode_raw = (data_raw >> 52) & 0xF
    differential_operation_mode = lookup_DIFFERENTIAL_MODE(differential_operation_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('differential_operation_mode', 'Differential Operation Mode', "", '', differential_operation_mode, differential_operation_mode_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_129550(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129550."""
    data_raw = 0
    # channel | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'channel'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Channel'")
    data_raw |= (field_value & 0xFF) << 0
    # frequency | Offset: 8, Length: 32, Resolution: 10, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Frequency'")        
    data_raw |= (int(field_value / 10) & 0xFFFFFFFF) << 8
    
    # serial_interface_bit_rate | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SERIAL_BIT_RATE(f.value) for f in nmea2000Message.fields if f.id == 'serial_interface_bit_rate'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Serial Interface Bit Rate'")
    data_raw |= (field_value & 0x1F) << 40
    # serial_interface_detection_mode | Offset: 45, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SERIAL_DETECTION_MODE(f.value) for f in nmea2000Message.fields if f.id == 'serial_interface_detection_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Serial Interface Detection Mode'")
    data_raw |= (field_value & 0x7) << 45
    # differential_source | Offset: 48, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIFFERENTIAL_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'differential_source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Differential Source'")
    data_raw |= (field_value & 0xF) << 48
    # differential_operation_mode | Offset: 52, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIFFERENTIAL_MODE(f.value) for f in nmea2000Message.fields if f.id == 'differential_operation_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Differential Operation Mode'")
    data_raw |= (field_value & 0xF) << 52
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_129551() -> bool:
    """Return True if PGN 129551 is a fast PGN."""
    return True
def decode_pgn_129551(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129551."""
    nmea2000Message = NMEA2000Message(129551, 'gnssDifferentialCorrectionReceiverSignal', 'GNSS Differential Correction Receiver Signal')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # channel | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    channel_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    channel = channel_raw * 1 if channel_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('channel', 'Channel', "", '', channel, channel_raw))

    # signal_strength | Offset: 16, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    signal_strength_raw = decode_number((data_raw >> 16) & 0xFFFFFFFF, 32)
    if signal_strength_raw is not None and signal_strength_raw & (1 << (32 - 1)):
        signal_strength_raw -= (1 << 32)
    signal_strength = signal_strength_raw * 0.01 if signal_strength_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('signal_strength', 'Signal Strength', "Signal strength in dB relative to 1 uV/m", 'dB', signal_strength, signal_strength_raw))

    # signal_snr | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    signal_snr_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    if signal_snr_raw is not None and signal_snr_raw & (1 << (16 - 1)):
        signal_snr_raw -= (1 << 16)
    signal_snr = signal_snr_raw * 0.01 if signal_snr_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('signal_snr', 'Signal SNR', "", 'dB', signal_snr, signal_snr_raw))

    # frequency | Offset: 64, Length: 32, Resolution: 10, Field Type: NUMBER, Match: 
    frequency_raw = decode_number((data_raw >> 64) & 0xFFFFFFFF, 32)
    frequency = frequency_raw * 10 if frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('frequency', 'Frequency', "", 'Hz', frequency, frequency_raw))

    # station_type | Offset: 96, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    station_type_raw = (data_raw >> 96) & 0xF
    station_type = lookup_GNS(station_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('station_type', 'Station Type', "", '', station_type, station_type_raw))

    # reference_station_id | Offset: 100, Length: 12, Resolution: 1, Field Type: NUMBER, Match: 
    reference_station_id_raw = decode_number((data_raw >> 100) & 0xFFF, 12)
    reference_station_id = reference_station_id_raw * 1 if reference_station_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reference_station_id', 'Reference Station ID', "", '', reference_station_id, reference_station_id_raw))

    # differential_signal_bit_rate | Offset: 112, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    differential_signal_bit_rate_raw = (data_raw >> 112) & 0x1F
    differential_signal_bit_rate = lookup_SERIAL_BIT_RATE(differential_signal_bit_rate_raw)
    nmea2000Message.fields.append(NMEA2000Field('differential_signal_bit_rate', 'Differential Signal Bit Rate', "", '', differential_signal_bit_rate, differential_signal_bit_rate_raw))

    # differential_signal_detection_mode | Offset: 117, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    differential_signal_detection_mode_raw = (data_raw >> 117) & 0x7
    differential_signal_detection_mode = lookup_SERIAL_DETECTION_MODE(differential_signal_detection_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('differential_signal_detection_mode', 'Differential Signal Detection Mode', "", '', differential_signal_detection_mode, differential_signal_detection_mode_raw))

    # used_as_correction_source | Offset: 120, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    used_as_correction_source_raw = (data_raw >> 120) & 0x3
    used_as_correction_source = lookup_YES_NO(used_as_correction_source_raw)
    nmea2000Message.fields.append(NMEA2000Field('used_as_correction_source', 'Used as Correction Source', "", '', used_as_correction_source, used_as_correction_source_raw))

    # reserved_122 | Offset: 122, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_122_raw = (data_raw >> 122) & 0x3
    reserved_122 = reserved_122_raw * 1 if reserved_122_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_122', 'Reserved', "", '', reserved_122, reserved_122_raw))

    # differential_source | Offset: 124, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    differential_source_raw = (data_raw >> 124) & 0xF
    differential_source = lookup_DIFFERENTIAL_SOURCE(differential_source_raw)
    nmea2000Message.fields.append(NMEA2000Field('differential_source', 'Differential Source', "", '', differential_source, differential_source_raw))

    # time_since_last_sat_differential_sync | Offset: 128, Length: 16, Resolution: 0.01, Field Type: TIME, Match: 
    time_since_last_sat_differential_sync_raw = (data_raw >> 128) & 0xFFFF
    time_since_last_sat_differential_sync = decode_time(time_since_last_sat_differential_sync_raw * 0.01)
    nmea2000Message.fields.append(NMEA2000Field('time_since_last_sat_differential_sync', 'Time since Last Sat Differential Sync', "Age of differential corrections", 's', time_since_last_sat_differential_sync, time_since_last_sat_differential_sync_raw))

    # satellite_service_id_no_ | Offset: 144, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    satellite_service_id_no__raw = decode_number((data_raw >> 144) & 0xFFFF, 16)
    satellite_service_id_no_ = satellite_service_id_no__raw * 1 if satellite_service_id_no__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('satellite_service_id_no_', 'Satellite Service ID No.', "", '', satellite_service_id_no_, satellite_service_id_no__raw))

    return nmea2000Message

def encode_pgn_129551(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129551."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # channel | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'channel'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Channel'")
    data_raw |= (field_value & 0xFF) << 8
    # signal_strength | Offset: 16, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'signal_strength'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Signal Strength'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 16
    
    # signal_snr | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'signal_snr'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Signal SNR'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 48
    
    # frequency | Offset: 64, Length: 32, Resolution: 10, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Frequency'")        
    data_raw |= (int(field_value / 10) & 0xFFFFFFFF) << 64
    
    # station_type | Offset: 96, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_GNS(f.value) for f in nmea2000Message.fields if f.id == 'station_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station Type'")
    data_raw |= (field_value & 0xF) << 96
    # reference_station_id | Offset: 100, Length: 12, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reference_station_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reference Station ID'")
    data_raw |= (field_value & 0xFFF) << 100
    # differential_signal_bit_rate | Offset: 112, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SERIAL_BIT_RATE(f.value) for f in nmea2000Message.fields if f.id == 'differential_signal_bit_rate'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Differential Signal Bit Rate'")
    data_raw |= (field_value & 0x1F) << 112
    # differential_signal_detection_mode | Offset: 117, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SERIAL_DETECTION_MODE(f.value) for f in nmea2000Message.fields if f.id == 'differential_signal_detection_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Differential Signal Detection Mode'")
    data_raw |= (field_value & 0x7) << 117
    # used_as_correction_source | Offset: 120, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'used_as_correction_source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Used as Correction Source'")
    data_raw |= (field_value & 0x3) << 120
    # reserved_122 | Offset: 122, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_122'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 122
    # differential_source | Offset: 124, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIFFERENTIAL_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'differential_source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Differential Source'")
    data_raw |= (field_value & 0xF) << 124
    # time_since_last_sat_differential_sync | Offset: 128, Length: 16, Resolution: 0.01, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'time_since_last_sat_differential_sync'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time since Last Sat Differential Sync'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 128
    
    # satellite_service_id_no_ | Offset: 144, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'satellite_service_id_no_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Satellite Service ID No.'")
    data_raw |= (field_value & 0xFFFF) << 144
    return data_raw


def is_fast_pgn_129556() -> bool:
    """Return True if PGN 129556 is a fast PGN."""
    return True
def decode_pgn_129556(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129556."""
    nmea2000Message = NMEA2000Message(129556, 'glonassAlmanacData', 'GLONASS Almanac Data')
    # prn | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    prn_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    prn = prn_raw * 1 if prn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('prn', 'PRN', "Satellite ID number", '', prn, prn_raw))

    # na | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    na_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    na = na_raw * 1 if na_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('na', 'NA', "Calendar day count within the four year period beginning with the previous leap year", '', na, na_raw))

    # reserved_24 | Offset: 24, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_24_raw = (data_raw >> 24) & 0x3
    reserved_24 = reserved_24_raw * 1 if reserved_24_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_24', 'Reserved', "", '', reserved_24, reserved_24_raw))

    # cna | Offset: 26, Length: 1, Resolution: 1, Field Type: NUMBER, Match: 
    cna_raw = decode_number((data_raw >> 26) & 0x1, 1)
    cna = cna_raw * 1 if cna_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('cna', 'CnA', "Generalized health of the satellite", '', cna, cna_raw))

    # hna | Offset: 27, Length: 5, Resolution: 1, Field Type: NUMBER, Match: 
    hna_raw = decode_number((data_raw >> 27) & 0x1F, 5)
    hna = hna_raw * 1 if hna_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('hna', 'HnA', "Carrier frequency number", '', hna, hna_raw))

    # _epsilon_na | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    _epsilon_na_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    _epsilon_na = _epsilon_na_raw * 1 if _epsilon_na_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('_epsilon_na', '(epsilon)nA', "Eccentricity", '', _epsilon_na, _epsilon_na_raw))

    # _deltatna_dot | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    _deltatna_dot_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    _deltatna_dot = _deltatna_dot_raw * 1 if _deltatna_dot_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('_deltatna_dot', '(deltaTnA)DOT', "Rate of change of the draconitic circling time", '', _deltatna_dot, _deltatna_dot_raw))

    # _omega_na | Offset: 56, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    _omega_na_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    _omega_na = _omega_na_raw * 1 if _omega_na_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('_omega_na', '(omega)nA', "Rate of change of the draconitic circling time", '', _omega_na, _omega_na_raw))

    # _delta_tna | Offset: 72, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    _delta_tna_raw = decode_number((data_raw >> 72) & 0xFFFFFF, 24)
    _delta_tna = _delta_tna_raw * 1 if _delta_tna_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('_delta_tna', '(delta)TnA', "Correction to the average value of the draconitic circling time", '', _delta_tna, _delta_tna_raw))

    # tna | Offset: 96, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    tna_raw = decode_number((data_raw >> 96) & 0xFFFFFF, 24)
    tna = tna_raw * 1 if tna_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('tna', 'tnA', "Time of the ascension node", '', tna, tna_raw))

    # _lambda_na | Offset: 120, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    _lambda_na_raw = decode_number((data_raw >> 120) & 0xFFFFFF, 24)
    _lambda_na = _lambda_na_raw * 1 if _lambda_na_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('_lambda_na', '(lambda)nA', "Greenwich longitude of the ascension node", '', _lambda_na, _lambda_na_raw))

    # _delta_ina | Offset: 144, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    _delta_ina_raw = decode_number((data_raw >> 144) & 0xFFFFFF, 24)
    _delta_ina = _delta_ina_raw * 1 if _delta_ina_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('_delta_ina', '(delta)inA', "Correction to the average value of the inclination angle", '', _delta_ina, _delta_ina_raw))

    # _tau_ca | Offset: 168, Length: 28, Resolution: 1, Field Type: NUMBER, Match: 
    _tau_ca_raw = decode_number((data_raw >> 168) & 0xFFFFFFF, 28)
    _tau_ca = _tau_ca_raw * 1 if _tau_ca_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('_tau_ca', '(tau)cA', "System time scale correction", '', _tau_ca, _tau_ca_raw))

    # _tau_na | Offset: 196, Length: 12, Resolution: 1, Field Type: NUMBER, Match: 
    _tau_na_raw = decode_number((data_raw >> 196) & 0xFFF, 12)
    _tau_na = _tau_na_raw * 1 if _tau_na_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('_tau_na', '(tau)nA', "Course value of the time scale shift", '', _tau_na, _tau_na_raw))

    return nmea2000Message

def encode_pgn_129556(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129556."""
    data_raw = 0
    # prn | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'prn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PRN'")
    data_raw |= (field_value & 0xFF) << 0
    # na | Offset: 8, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'na'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'NA'")
    data_raw |= (field_value & 0xFFFF) << 8
    # reserved_24 | Offset: 24, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_24'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 24
    # cna | Offset: 26, Length: 1, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'cna'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'CnA'")
    data_raw |= (field_value & 0x1) << 26
    # hna | Offset: 27, Length: 5, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'hna'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'HnA'")
    data_raw |= (field_value & 0x1F) << 27
    # _epsilon_na | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == '_epsilon_na'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing '(epsilon)nA'")
    data_raw |= (field_value & 0xFFFF) << 32
    # _deltatna_dot | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == '_deltatna_dot'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing '(deltaTnA)DOT'")
    data_raw |= (field_value & 0xFF) << 48
    # _omega_na | Offset: 56, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == '_omega_na'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing '(omega)nA'")
    data_raw |= (field_value & 0xFFFF) << 56
    # _delta_tna | Offset: 72, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == '_delta_tna'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing '(delta)TnA'")
    data_raw |= (field_value & 0xFFFFFF) << 72
    # tna | Offset: 96, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'tna'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'tnA'")
    data_raw |= (field_value & 0xFFFFFF) << 96
    # _lambda_na | Offset: 120, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == '_lambda_na'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing '(lambda)nA'")
    data_raw |= (field_value & 0xFFFFFF) << 120
    # _delta_ina | Offset: 144, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == '_delta_ina'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing '(delta)inA'")
    data_raw |= (field_value & 0xFFFFFF) << 144
    # _tau_ca | Offset: 168, Length: 28, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == '_tau_ca'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing '(tau)cA'")
    data_raw |= (field_value & 0xFFFFFFF) << 168
    # _tau_na | Offset: 196, Length: 12, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == '_tau_na'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing '(tau)nA'")
    data_raw |= (field_value & 0xFFF) << 196
    return data_raw


def is_fast_pgn_129792() -> bool:
    """Return True if PGN 129792 is a fast PGN."""
    return True
def decode_pgn_129792(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129792."""
    nmea2000Message = NMEA2000Message(129792, 'aisDgnssBroadcastBinaryMessage', 'AIS DGNSS Broadcast Binary Message')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    repeat_indicator_raw = decode_number((data_raw >> 6) & 0x3, 2)
    repeat_indicator = repeat_indicator_raw * 1 if repeat_indicator_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    source_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # reserved_40 | Offset: 40, Length: 1, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0x1
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    # ais_transceiver_information | Offset: 41, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 41) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # spare | Offset: 46, Length: 2, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 46) & 0x3
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # longitude | Offset: 48, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    longitude_raw = decode_number((data_raw >> 48) & 0xFFFFFFFF, 32)
    if longitude_raw is not None and longitude_raw & (1 << (32 - 1)):
        longitude_raw -= (1 << 32)
    longitude = longitude_raw * 1e-07 if longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitude', 'Longitude', "", 'deg', longitude, longitude_raw))

    # latitude | Offset: 80, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    latitude_raw = decode_number((data_raw >> 80) & 0xFFFFFFFF, 32)
    if latitude_raw is not None and latitude_raw & (1 << (32 - 1)):
        latitude_raw -= (1 << 32)
    latitude = latitude_raw * 1e-07 if latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('latitude', 'Latitude', "", 'deg', latitude, latitude_raw))

    # reserved_112 | Offset: 112, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_112_raw = (data_raw >> 112) & 0x7
    reserved_112 = reserved_112_raw * 1 if reserved_112_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_112', 'Reserved', "", '', reserved_112, reserved_112_raw))

    # spare | Offset: 115, Length: 5, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 115) & 0x1F
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # number_of_bits_in_binary_data_field | Offset: 120, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_bits_in_binary_data_field_raw = decode_number((data_raw >> 120) & 0xFFFF, 16)
    number_of_bits_in_binary_data_field = number_of_bits_in_binary_data_field_raw * 1 if number_of_bits_in_binary_data_field_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_bits_in_binary_data_field', 'Number of Bits in Binary Data Field', "", '', number_of_bits_in_binary_data_field, number_of_bits_in_binary_data_field_raw))


    return nmea2000Message

def encode_pgn_129792(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129792."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # reserved_40 | Offset: 40, Length: 1, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1) << 40
    # ais_transceiver_information | Offset: 41, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 41
    # spare | Offset: 46, Length: 2, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0x3) << 46
    # longitude | Offset: 48, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 48
    
    # latitude | Offset: 80, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 80
    
    # reserved_112 | Offset: 112, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_112'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 112
    # spare | Offset: 115, Length: 5, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0x1F) << 115
    # number_of_bits_in_binary_data_field | Offset: 120, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_bits_in_binary_data_field'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Bits in Binary Data Field'")
    data_raw |= (field_value & 0xFFFF) << 120
    raise Exception ("PGN 129792 not supporting encoding for now as Binary Data is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_129793() -> bool:
    """Return True if PGN 129793 is a fast PGN."""
    return True
def decode_pgn_129793(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129793."""
    nmea2000Message = NMEA2000Message(129793, 'aisUtcAndDateReport', 'AIS UTC and Date Report')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    user_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    user_id = user_id_raw * 1 if user_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('user_id', 'User ID', "", '', user_id, user_id_raw))

    # longitude | Offset: 40, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    longitude_raw = decode_number((data_raw >> 40) & 0xFFFFFFFF, 32)
    if longitude_raw is not None and longitude_raw & (1 << (32 - 1)):
        longitude_raw -= (1 << 32)
    longitude = longitude_raw * 1e-07 if longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitude', 'Longitude', "", 'deg', longitude, longitude_raw))

    # latitude | Offset: 72, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    latitude_raw = decode_number((data_raw >> 72) & 0xFFFFFFFF, 32)
    if latitude_raw is not None and latitude_raw & (1 << (32 - 1)):
        latitude_raw -= (1 << 32)
    latitude = latitude_raw * 1e-07 if latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('latitude', 'Latitude', "", 'deg', latitude, latitude_raw))

    # position_accuracy | Offset: 104, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    position_accuracy_raw = (data_raw >> 104) & 0x1
    position_accuracy = lookup_POSITION_ACCURACY(position_accuracy_raw)
    nmea2000Message.fields.append(NMEA2000Field('position_accuracy', 'Position Accuracy', "", '', position_accuracy, position_accuracy_raw))

    # raim | Offset: 105, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    raim_raw = (data_raw >> 105) & 0x1
    raim = lookup_RAIM_FLAG(raim_raw)
    nmea2000Message.fields.append(NMEA2000Field('raim', 'RAIM', "", '', raim, raim_raw))

    # reserved_106 | Offset: 106, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_106_raw = (data_raw >> 106) & 0x3F
    reserved_106 = reserved_106_raw * 1 if reserved_106_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_106', 'Reserved', "", '', reserved_106, reserved_106_raw))

    # position_time | Offset: 112, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    position_time_raw = (data_raw >> 112) & 0xFFFFFFFF
    position_time = decode_time(position_time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('position_time', 'Position Time', "Seconds since midnight", 's', position_time, position_time_raw))

    # communication_state | Offset: 144, Length: 19, Resolution: 1, Field Type: BINARY, Match: 
    communication_state_raw = (data_raw >> 144) & 0x7FFFF
    communication_state = communication_state_raw * 1 if communication_state_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('communication_state', 'Communication State', "Information used by the TDMA slot allocation algorithm and synchronization information", '', communication_state, communication_state_raw))

    # ais_transceiver_information | Offset: 163, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 163) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # position_date | Offset: 168, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    position_date_raw = (data_raw >> 168) & 0xFFFF
    position_date = decode_date(position_date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('position_date', 'Position Date', "", 'd', position_date, position_date_raw))

    # reserved_184 | Offset: 184, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_184_raw = (data_raw >> 184) & 0xF
    reserved_184 = reserved_184_raw * 1 if reserved_184_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_184', 'Reserved', "", '', reserved_184, reserved_184_raw))

    # gnss_type | Offset: 188, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    gnss_type_raw = (data_raw >> 188) & 0xF
    gnss_type = lookup_POSITION_FIX_DEVICE(gnss_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('gnss_type', 'GNSS type', "", '', gnss_type, gnss_type_raw))

    # spare | Offset: 192, Length: 8, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 192) & 0xFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    return nmea2000Message

def encode_pgn_129793(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129793."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'user_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'User ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # longitude | Offset: 40, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 40
    
    # latitude | Offset: 72, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 72
    
    # position_accuracy | Offset: 104, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POSITION_ACCURACY(f.value) for f in nmea2000Message.fields if f.id == 'position_accuracy'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Accuracy'")
    data_raw |= (field_value & 0x1) << 104
    # raim | Offset: 105, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RAIM_FLAG(f.value) for f in nmea2000Message.fields if f.id == 'raim'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'RAIM'")
    data_raw |= (field_value & 0x1) << 105
    # reserved_106 | Offset: 106, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_106'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 106
    # position_time | Offset: 112, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 112
    
    # communication_state | Offset: 144, Length: 19, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'communication_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Communication State'")
    data_raw |= (field_value & 0x7FFFF) << 144
    # ais_transceiver_information | Offset: 163, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 163
    # position_date | Offset: 168, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Date'")
    data_raw |= (field_value & 0xFFFF) << 168
    # reserved_184 | Offset: 184, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_184'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 184
    # gnss_type | Offset: 188, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POSITION_FIX_DEVICE(f.value) for f in nmea2000Message.fields if f.id == 'gnss_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'GNSS type'")
    data_raw |= (field_value & 0xF) << 188
    # spare | Offset: 192, Length: 8, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFF) << 192
    return data_raw


def is_fast_pgn_129794() -> bool:
    """Return True if PGN 129794 is a fast PGN."""
    return True
def decode_pgn_129794(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129794."""
    nmea2000Message = NMEA2000Message(129794, 'aisClassAStaticAndVoyageRelatedData', 'AIS Class A Static and Voyage Related Data')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    user_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    user_id = user_id_raw * 1 if user_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('user_id', 'User ID', "", '', user_id, user_id_raw))

    # imo_number | Offset: 40, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    imo_number_raw = decode_number((data_raw >> 40) & 0xFFFFFFFF, 32)
    imo_number = imo_number_raw * 1 if imo_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('imo_number', 'IMO number', "", '', imo_number, imo_number_raw))

    # callsign | Offset: 72, Length: 56, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # name | Offset: 128, Length: 160, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # type_of_ship | Offset: 288, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    type_of_ship_raw = (data_raw >> 288) & 0xFF
    type_of_ship = lookup_SHIP_TYPE(type_of_ship_raw)
    nmea2000Message.fields.append(NMEA2000Field('type_of_ship', 'Type of ship', "", '', type_of_ship, type_of_ship_raw))

    # length | Offset: 296, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    length_raw = decode_number((data_raw >> 296) & 0xFFFF, 16)
    length = length_raw * 0.1 if length_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('length', 'Length', "", 'm', length, length_raw))

    # beam | Offset: 312, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    beam_raw = decode_number((data_raw >> 312) & 0xFFFF, 16)
    beam = beam_raw * 0.1 if beam_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('beam', 'Beam', "", 'm', beam, beam_raw))

    # position_reference_from_starboard | Offset: 328, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    position_reference_from_starboard_raw = decode_number((data_raw >> 328) & 0xFFFF, 16)
    position_reference_from_starboard = position_reference_from_starboard_raw * 0.1 if position_reference_from_starboard_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('position_reference_from_starboard', 'Position reference from Starboard', "", 'm', position_reference_from_starboard, position_reference_from_starboard_raw))

    # position_reference_from_bow | Offset: 344, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    position_reference_from_bow_raw = decode_number((data_raw >> 344) & 0xFFFF, 16)
    position_reference_from_bow = position_reference_from_bow_raw * 0.1 if position_reference_from_bow_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('position_reference_from_bow', 'Position reference from Bow', "", 'm', position_reference_from_bow, position_reference_from_bow_raw))

    # eta_date | Offset: 360, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    eta_date_raw = (data_raw >> 360) & 0xFFFF
    eta_date = decode_date(eta_date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('eta_date', 'ETA Date', "", 'd', eta_date, eta_date_raw))

    # eta_time | Offset: 376, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    eta_time_raw = (data_raw >> 376) & 0xFFFFFFFF
    eta_time = decode_time(eta_time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('eta_time', 'ETA Time', "Seconds since midnight", 's', eta_time, eta_time_raw))

    # draft | Offset: 408, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    draft_raw = decode_number((data_raw >> 408) & 0xFFFF, 16)
    draft = draft_raw * 0.01 if draft_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('draft', 'Draft', "", 'm', draft, draft_raw))

    # destination | Offset: 424, Length: 160, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # ais_version_indicator | Offset: 584, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_version_indicator_raw = (data_raw >> 584) & 0x3
    ais_version_indicator = lookup_AIS_VERSION(ais_version_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_version_indicator', 'AIS version indicator', "", '', ais_version_indicator, ais_version_indicator_raw))

    # gnss_type | Offset: 586, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    gnss_type_raw = (data_raw >> 586) & 0xF
    gnss_type = lookup_POSITION_FIX_DEVICE(gnss_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('gnss_type', 'GNSS type', "", '', gnss_type, gnss_type_raw))

    # dte | Offset: 590, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    dte_raw = (data_raw >> 590) & 0x1
    dte = lookup_AVAILABLE(dte_raw)
    nmea2000Message.fields.append(NMEA2000Field('dte', 'DTE', "", '', dte, dte_raw))

    # reserved_591 | Offset: 591, Length: 1, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_591_raw = (data_raw >> 591) & 0x1
    reserved_591 = reserved_591_raw * 1 if reserved_591_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_591', 'Reserved', "", '', reserved_591, reserved_591_raw))

    # ais_transceiver_information | Offset: 592, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 592) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # reserved_597 | Offset: 597, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_597_raw = (data_raw >> 597) & 0x7
    reserved_597 = reserved_597_raw * 1 if reserved_597_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_597', 'Reserved', "", '', reserved_597, reserved_597_raw))

    return nmea2000Message

def encode_pgn_129794(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129794."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'user_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'User ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # imo_number | Offset: 40, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'imo_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'IMO number'")
    data_raw |= (field_value & 0xFFFFFFFF) << 40
    # callsign | Offset: 72, Length: 56, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Callsign'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFF) << 72
    # name | Offset: 128, Length: 160, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Name'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 128
    # type_of_ship | Offset: 288, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SHIP_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'type_of_ship'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Type of ship'")
    data_raw |= (field_value & 0xFF) << 288
    # length | Offset: 296, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'length'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Length'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 296
    
    # beam | Offset: 312, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'beam'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Beam'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 312
    
    # position_reference_from_starboard | Offset: 328, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_reference_from_starboard'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position reference from Starboard'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 328
    
    # position_reference_from_bow | Offset: 344, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_reference_from_bow'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position reference from Bow'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 344
    
    # eta_date | Offset: 360, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'eta_date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ETA Date'")
    data_raw |= (field_value & 0xFFFF) << 360
    # eta_time | Offset: 376, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'eta_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ETA Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 376
    
    # draft | Offset: 408, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'draft'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Draft'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 408
    
    # destination | Offset: 424, Length: 160, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 424
    # ais_version_indicator | Offset: 584, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_VERSION(f.value) for f in nmea2000Message.fields if f.id == 'ais_version_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS version indicator'")
    data_raw |= (field_value & 0x3) << 584
    # gnss_type | Offset: 586, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POSITION_FIX_DEVICE(f.value) for f in nmea2000Message.fields if f.id == 'gnss_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'GNSS type'")
    data_raw |= (field_value & 0xF) << 586
    # dte | Offset: 590, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AVAILABLE(f.value) for f in nmea2000Message.fields if f.id == 'dte'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DTE'")
    data_raw |= (field_value & 0x1) << 590
    # reserved_591 | Offset: 591, Length: 1, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_591'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1) << 591
    # ais_transceiver_information | Offset: 592, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 592
    # reserved_597 | Offset: 597, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_597'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 597
    return data_raw


def is_fast_pgn_129795() -> bool:
    """Return True if PGN 129795 is a fast PGN."""
    return True
def decode_pgn_129795(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129795."""
    nmea2000Message = NMEA2000Message(129795, 'aisAddressedBinaryMessage', 'AIS Addressed Binary Message')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    source_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # reserved_40 | Offset: 40, Length: 1, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0x1
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    # ais_transceiver_information | Offset: 41, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 41) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # sequence_number | Offset: 46, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    sequence_number_raw = decode_number((data_raw >> 46) & 0x3, 2)
    sequence_number = sequence_number_raw * 1 if sequence_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sequence_number', 'Sequence Number', "", '', sequence_number, sequence_number_raw))

    # destination_id | Offset: 48, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    destination_id_raw = (data_raw >> 48) & 0xFFFFFFFF
    destination_id = destination_id_raw * 1 if destination_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('destination_id', 'Destination ID', "", '', destination_id, destination_id_raw))

    # reserved_80 | Offset: 80, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_80_raw = (data_raw >> 80) & 0x3F
    reserved_80 = reserved_80_raw * 1 if reserved_80_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_80', 'Reserved', "", '', reserved_80, reserved_80_raw))

    # retransmit_flag | Offset: 86, Length: 1, Resolution: 1, Field Type: NUMBER, Match: 
    retransmit_flag_raw = decode_number((data_raw >> 86) & 0x1, 1)
    retransmit_flag = retransmit_flag_raw * 1 if retransmit_flag_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('retransmit_flag', 'Retransmit flag', "", '', retransmit_flag, retransmit_flag_raw))

    # reserved_87 | Offset: 87, Length: 1, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_87_raw = (data_raw >> 87) & 0x1
    reserved_87 = reserved_87_raw * 1 if reserved_87_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_87', 'Reserved', "", '', reserved_87, reserved_87_raw))

    # number_of_bits_in_binary_data_field | Offset: 88, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_bits_in_binary_data_field_raw = decode_number((data_raw >> 88) & 0xFFFF, 16)
    number_of_bits_in_binary_data_field = number_of_bits_in_binary_data_field_raw * 1 if number_of_bits_in_binary_data_field_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_bits_in_binary_data_field', 'Number of Bits in Binary Data Field', "", '', number_of_bits_in_binary_data_field, number_of_bits_in_binary_data_field_raw))


    return nmea2000Message

def encode_pgn_129795(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129795."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # reserved_40 | Offset: 40, Length: 1, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1) << 40
    # ais_transceiver_information | Offset: 41, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 41
    # sequence_number | Offset: 46, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sequence_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sequence Number'")
    data_raw |= (field_value & 0x3) << 46
    # destination_id | Offset: 48, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'destination_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 48
    # reserved_80 | Offset: 80, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_80'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 80
    # retransmit_flag | Offset: 86, Length: 1, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'retransmit_flag'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Retransmit flag'")
    data_raw |= (field_value & 0x1) << 86
    # reserved_87 | Offset: 87, Length: 1, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_87'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1) << 87
    # number_of_bits_in_binary_data_field | Offset: 88, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_bits_in_binary_data_field'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Bits in Binary Data Field'")
    data_raw |= (field_value & 0xFFFF) << 88
    raise Exception ("PGN 129795 not supporting encoding for now as Binary Data is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_129796() -> bool:
    """Return True if PGN 129796 is a fast PGN."""
    return True
def decode_pgn_129796(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129796."""
    nmea2000Message = NMEA2000Message(129796, 'aisAcknowledge', 'AIS Acknowledge')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    source_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # reserved_40 | Offset: 40, Length: 1, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0x1
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    # ais_transceiver_information | Offset: 41, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 41) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # reserved_46 | Offset: 46, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_46_raw = (data_raw >> 46) & 0x3
    reserved_46 = reserved_46_raw * 1 if reserved_46_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_46', 'Reserved', "", '', reserved_46, reserved_46_raw))

    # destination_id__1 | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    destination_id__1_raw = decode_number((data_raw >> 48) & 0xFFFFFFFF, 32)
    destination_id__1 = destination_id__1_raw * 1 if destination_id__1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('destination_id__1', 'Destination ID #1', "", '', destination_id__1, destination_id__1_raw))

    # sequence_number_for_id_1 | Offset: 80, Length: 2, Resolution: 1, Field Type: BINARY, Match: 
    sequence_number_for_id_1_raw = (data_raw >> 80) & 0x3
    sequence_number_for_id_1 = sequence_number_for_id_1_raw * 1 if sequence_number_for_id_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sequence_number_for_id_1', 'Sequence Number for ID 1', "reserved", '', sequence_number_for_id_1, sequence_number_for_id_1_raw))

    # reserved_82 | Offset: 82, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_82_raw = (data_raw >> 82) & 0x3F
    reserved_82 = reserved_82_raw * 1 if reserved_82_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_82', 'Reserved', "", '', reserved_82, reserved_82_raw))

    # sequence_number_for_id_n | Offset: 88, Length: 2, Resolution: 1, Field Type: BINARY, Match: 
    sequence_number_for_id_n_raw = (data_raw >> 88) & 0x3
    sequence_number_for_id_n = sequence_number_for_id_n_raw * 1 if sequence_number_for_id_n_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sequence_number_for_id_n', 'Sequence Number for ID n', "reserved", '', sequence_number_for_id_n, sequence_number_for_id_n_raw))

    # reserved_90 | Offset: 90, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_90_raw = (data_raw >> 90) & 0x3F
    reserved_90 = reserved_90_raw * 1 if reserved_90_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_90', 'Reserved', "", '', reserved_90, reserved_90_raw))

    return nmea2000Message

def encode_pgn_129796(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129796."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # reserved_40 | Offset: 40, Length: 1, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1) << 40
    # ais_transceiver_information | Offset: 41, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 41
    # reserved_46 | Offset: 46, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_46'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 46
    # destination_id__1 | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'destination_id__1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination ID #1'")
    data_raw |= (field_value & 0xFFFFFFFF) << 48
    # sequence_number_for_id_1 | Offset: 80, Length: 2, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sequence_number_for_id_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sequence Number for ID 1'")
    data_raw |= (field_value & 0x3) << 80
    # reserved_82 | Offset: 82, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_82'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 82
    # sequence_number_for_id_n | Offset: 88, Length: 2, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sequence_number_for_id_n'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sequence Number for ID n'")
    data_raw |= (field_value & 0x3) << 88
    # reserved_90 | Offset: 90, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_90'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 90
    return data_raw


def is_fast_pgn_129797() -> bool:
    """Return True if PGN 129797 is a fast PGN."""
    return True
def decode_pgn_129797(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129797."""
    nmea2000Message = NMEA2000Message(129797, 'aisBinaryBroadcastMessage', 'AIS Binary Broadcast Message')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    source_id_raw = decode_number((data_raw >> 8) & 0xFFFFFFFF, 32)
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # reserved_40 | Offset: 40, Length: 1, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0x1
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    # ais_transceiver_information | Offset: 41, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 41) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # reserved_46 | Offset: 46, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_46_raw = (data_raw >> 46) & 0x3
    reserved_46 = reserved_46_raw * 1 if reserved_46_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_46', 'Reserved', "", '', reserved_46, reserved_46_raw))

    # number_of_bits_in_binary_data_field | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_bits_in_binary_data_field_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    number_of_bits_in_binary_data_field = number_of_bits_in_binary_data_field_raw * 1 if number_of_bits_in_binary_data_field_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_bits_in_binary_data_field', 'Number of Bits in Binary Data Field', "", '', number_of_bits_in_binary_data_field, number_of_bits_in_binary_data_field_raw))


    return nmea2000Message

def encode_pgn_129797(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129797."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # reserved_40 | Offset: 40, Length: 1, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1) << 40
    # ais_transceiver_information | Offset: 41, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 41
    # reserved_46 | Offset: 46, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_46'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 46
    # number_of_bits_in_binary_data_field | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_bits_in_binary_data_field'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Bits in Binary Data Field'")
    data_raw |= (field_value & 0xFFFF) << 48
    raise Exception ("PGN 129797 not supporting encoding for now as Binary Data is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_129798() -> bool:
    """Return True if PGN 129798 is a fast PGN."""
    return True
def decode_pgn_129798(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129798."""
    nmea2000Message = NMEA2000Message(129798, 'aisSarAircraftPositionReport', 'AIS SAR Aircraft Position Report')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    user_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    user_id = user_id_raw * 1 if user_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('user_id', 'User ID', "", '', user_id, user_id_raw))

    # longitude | Offset: 40, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    longitude_raw = decode_number((data_raw >> 40) & 0xFFFFFFFF, 32)
    if longitude_raw is not None and longitude_raw & (1 << (32 - 1)):
        longitude_raw -= (1 << 32)
    longitude = longitude_raw * 1e-07 if longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitude', 'Longitude', "", 'deg', longitude, longitude_raw))

    # latitude | Offset: 72, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    latitude_raw = decode_number((data_raw >> 72) & 0xFFFFFFFF, 32)
    if latitude_raw is not None and latitude_raw & (1 << (32 - 1)):
        latitude_raw -= (1 << 32)
    latitude = latitude_raw * 1e-07 if latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('latitude', 'Latitude', "", 'deg', latitude, latitude_raw))

    # position_accuracy | Offset: 104, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    position_accuracy_raw = (data_raw >> 104) & 0x1
    position_accuracy = lookup_POSITION_ACCURACY(position_accuracy_raw)
    nmea2000Message.fields.append(NMEA2000Field('position_accuracy', 'Position Accuracy', "", '', position_accuracy, position_accuracy_raw))

    # raim | Offset: 105, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    raim_raw = (data_raw >> 105) & 0x1
    raim = lookup_RAIM_FLAG(raim_raw)
    nmea2000Message.fields.append(NMEA2000Field('raim', 'RAIM', "", '', raim, raim_raw))

    # time_stamp | Offset: 106, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    time_stamp_raw = (data_raw >> 106) & 0x3F
    time_stamp = lookup_TIME_STAMP(time_stamp_raw)
    nmea2000Message.fields.append(NMEA2000Field('time_stamp', 'Time Stamp', "", '', time_stamp, time_stamp_raw))

    # cog | Offset: 112, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    cog_raw = decode_number((data_raw >> 112) & 0xFFFF, 16)
    cog = cog_raw * 0.0001 if cog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('cog', 'COG', "", 'rad', cog, cog_raw))

    # sog | Offset: 128, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    sog_raw = decode_number((data_raw >> 128) & 0xFFFF, 16)
    sog = sog_raw * 0.1 if sog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sog', 'SOG', "", 'm/s', sog, sog_raw))

    # communication_state | Offset: 144, Length: 19, Resolution: 1, Field Type: BINARY, Match: 
    communication_state_raw = (data_raw >> 144) & 0x7FFFF
    communication_state = communication_state_raw * 1 if communication_state_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('communication_state', 'Communication State', "Information used by the TDMA slot allocation algorithm and synchronization information", '', communication_state, communication_state_raw))

    # ais_transceiver_information | Offset: 163, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 163) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # altitude | Offset: 168, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    altitude_raw = decode_number((data_raw >> 168) & 0xFFFFFFFF, 32)
    if altitude_raw is not None and altitude_raw & (1 << (32 - 1)):
        altitude_raw -= (1 << 32)
    altitude = altitude_raw * 0.01 if altitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('altitude', 'Altitude', "", 'm', altitude, altitude_raw))

    # reserved_for_regional_applications | Offset: 200, Length: 8, Resolution: 1, Field Type: BINARY, Match: 
    reserved_for_regional_applications_raw = (data_raw >> 200) & 0xFF
    reserved_for_regional_applications = reserved_for_regional_applications_raw * 1 if reserved_for_regional_applications_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_for_regional_applications', 'Reserved for Regional Applications', "", '', reserved_for_regional_applications, reserved_for_regional_applications_raw))

    # dte | Offset: 208, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    dte_raw = (data_raw >> 208) & 0x1
    dte = lookup_AVAILABLE(dte_raw)
    nmea2000Message.fields.append(NMEA2000Field('dte', 'DTE', "", '', dte, dte_raw))

    # reserved_209 | Offset: 209, Length: 7, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_209_raw = (data_raw >> 209) & 0x7F
    reserved_209 = reserved_209_raw * 1 if reserved_209_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_209', 'Reserved', "", '', reserved_209, reserved_209_raw))

    return nmea2000Message

def encode_pgn_129798(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129798."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'user_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'User ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # longitude | Offset: 40, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 40
    
    # latitude | Offset: 72, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 72
    
    # position_accuracy | Offset: 104, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POSITION_ACCURACY(f.value) for f in nmea2000Message.fields if f.id == 'position_accuracy'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position Accuracy'")
    data_raw |= (field_value & 0x1) << 104
    # raim | Offset: 105, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RAIM_FLAG(f.value) for f in nmea2000Message.fields if f.id == 'raim'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'RAIM'")
    data_raw |= (field_value & 0x1) << 105
    # time_stamp | Offset: 106, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TIME_STAMP(f.value) for f in nmea2000Message.fields if f.id == 'time_stamp'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Time Stamp'")
    data_raw |= (field_value & 0x3F) << 106
    # cog | Offset: 112, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'cog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'COG'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 112
    
    # sog | Offset: 128, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SOG'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 128
    
    # communication_state | Offset: 144, Length: 19, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'communication_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Communication State'")
    data_raw |= (field_value & 0x7FFFF) << 144
    # ais_transceiver_information | Offset: 163, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 163
    # altitude | Offset: 168, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'altitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Altitude'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 168
    
    # reserved_for_regional_applications | Offset: 200, Length: 8, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_for_regional_applications'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved for Regional Applications'")
    data_raw |= (field_value & 0xFF) << 200
    # dte | Offset: 208, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AVAILABLE(f.value) for f in nmea2000Message.fields if f.id == 'dte'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DTE'")
    data_raw |= (field_value & 0x1) << 208
    # reserved_209 | Offset: 209, Length: 7, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_209'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7F) << 209
    return data_raw


def is_fast_pgn_129799() -> bool:
    """Return True if PGN 129799 is a fast PGN."""
    return True
def decode_pgn_129799(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129799."""
    nmea2000Message = NMEA2000Message(129799, 'radioFrequencyModePower', 'Radio Frequency/Mode/Power')
    # rx_frequency | Offset: 0, Length: 32, Resolution: 10, Field Type: NUMBER, Match: 
    rx_frequency_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    rx_frequency = rx_frequency_raw * 10 if rx_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rx_frequency', 'Rx Frequency', "", 'Hz', rx_frequency, rx_frequency_raw))

    # tx_frequency | Offset: 32, Length: 32, Resolution: 10, Field Type: NUMBER, Match: 
    tx_frequency_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    tx_frequency = tx_frequency_raw * 10 if tx_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('tx_frequency', 'Tx Frequency', "", 'Hz', tx_frequency, tx_frequency_raw))

    # radio_channel | Offset: 64, Length: 48, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # tx_power | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    tx_power_raw = decode_number((data_raw >> 112) & 0xFF, 8)
    tx_power = tx_power_raw * 1 if tx_power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('tx_power', 'Tx Power', "", 'W', tx_power, tx_power_raw))

    # mode | Offset: 120, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    mode_raw = decode_number((data_raw >> 120) & 0xFFFF, 16)
    mode = mode_raw * 1 if mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "", '', mode, mode_raw))

    # channel_bandwidth | Offset: 136, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    channel_bandwidth_raw = decode_number((data_raw >> 136) & 0xFFFF, 16)
    channel_bandwidth = channel_bandwidth_raw * 1 if channel_bandwidth_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('channel_bandwidth', 'Channel Bandwidth', "", 'Hz', channel_bandwidth, channel_bandwidth_raw))

    return nmea2000Message

def encode_pgn_129799(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129799."""
    data_raw = 0
    # rx_frequency | Offset: 0, Length: 32, Resolution: 10, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rx_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rx Frequency'")        
    data_raw |= (int(field_value / 10) & 0xFFFFFFFF) << 0
    
    # tx_frequency | Offset: 32, Length: 32, Resolution: 10, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'tx_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Tx Frequency'")        
    data_raw |= (int(field_value / 10) & 0xFFFFFFFF) << 32
    
    # radio_channel | Offset: 64, Length: 48, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Radio Channel'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 64
    # tx_power | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'tx_power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Tx Power'")
    data_raw |= (field_value & 0xFF) << 112
    # mode | Offset: 120, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xFFFF) << 120
    # channel_bandwidth | Offset: 136, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'channel_bandwidth'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Channel Bandwidth'")
    data_raw |= (field_value & 0xFFFF) << 136
    return data_raw


def is_fast_pgn_129800() -> bool:
    """Return True if PGN 129800 is a fast PGN."""
    return True
def decode_pgn_129800(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129800."""
    nmea2000Message = NMEA2000Message(129800, 'aisUtcDateInquiry', 'AIS UTC/Date Inquiry')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    source_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # ais_transceiver_information | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 40) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # reserved_45 | Offset: 45, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_45_raw = (data_raw >> 45) & 0x7
    reserved_45 = reserved_45_raw * 1 if reserved_45_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_45', 'Reserved', "", '', reserved_45, reserved_45_raw))

    # destination_id | Offset: 48, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    destination_id_raw = (data_raw >> 48) & 0xFFFFFFFF
    destination_id = destination_id_raw * 1 if destination_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('destination_id', 'Destination ID', "", '', destination_id, destination_id_raw))

    return nmea2000Message

def encode_pgn_129800(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129800."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # ais_transceiver_information | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 40
    # reserved_45 | Offset: 45, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_45'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 45
    # destination_id | Offset: 48, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'destination_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 48
    return data_raw


def is_fast_pgn_129801() -> bool:
    """Return True if PGN 129801 is a fast PGN."""
    return True
def decode_pgn_129801(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129801."""
    nmea2000Message = NMEA2000Message(129801, 'aisAddressedSafetyRelatedMessage', 'AIS Addressed Safety Related Message')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    source_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # ais_transceiver_information | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 40) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # sequence_number | Offset: 45, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    sequence_number_raw = decode_number((data_raw >> 45) & 0x3, 2)
    sequence_number = sequence_number_raw * 1 if sequence_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sequence_number', 'Sequence Number', "", '', sequence_number, sequence_number_raw))

    # reserved_47 | Offset: 47, Length: 1, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_47_raw = (data_raw >> 47) & 0x1
    reserved_47 = reserved_47_raw * 1 if reserved_47_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_47', 'Reserved', "", '', reserved_47, reserved_47_raw))

    # destination_id | Offset: 48, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    destination_id_raw = (data_raw >> 48) & 0xFFFFFFFF
    destination_id = destination_id_raw * 1 if destination_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('destination_id', 'Destination ID', "", '', destination_id, destination_id_raw))

    # retransmit_flag | Offset: 80, Length: 1, Resolution: 1, Field Type: NUMBER, Match: 
    retransmit_flag_raw = decode_number((data_raw >> 80) & 0x1, 1)
    retransmit_flag = retransmit_flag_raw * 1 if retransmit_flag_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('retransmit_flag', 'Retransmit flag', "", '', retransmit_flag, retransmit_flag_raw))

    # reserved_81 | Offset: 81, Length: 7, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_81_raw = (data_raw >> 81) & 0x7F
    reserved_81 = reserved_81_raw * 1 if reserved_81_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_81', 'Reserved', "", '', reserved_81, reserved_81_raw))

    # safety_related_text | Offset: 88, Length: 936, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_129801(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129801."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # ais_transceiver_information | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 40
    # sequence_number | Offset: 45, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sequence_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sequence Number'")
    data_raw |= (field_value & 0x3) << 45
    # reserved_47 | Offset: 47, Length: 1, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_47'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1) << 47
    # destination_id | Offset: 48, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'destination_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 48
    # retransmit_flag | Offset: 80, Length: 1, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'retransmit_flag'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Retransmit flag'")
    data_raw |= (field_value & 0x1) << 80
    # reserved_81 | Offset: 81, Length: 7, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_81'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7F) << 81
    # safety_related_text | Offset: 88, Length: 936, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Safety Related Text'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 88
    return data_raw


def is_fast_pgn_129802() -> bool:
    """Return True if PGN 129802 is a fast PGN."""
    return True
def decode_pgn_129802(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129802."""
    nmea2000Message = NMEA2000Message(129802, 'aisSafetyRelatedBroadcastMessage', 'AIS Safety Related Broadcast Message')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    source_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # ais_transceiver_information | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 40) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # reserved_45 | Offset: 45, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_45_raw = (data_raw >> 45) & 0x7
    reserved_45 = reserved_45_raw * 1 if reserved_45_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_45', 'Reserved', "", '', reserved_45, reserved_45_raw))

    # safety_related_text | Offset: 48, Length: 1296, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_129802(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129802."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # ais_transceiver_information | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 40
    # reserved_45 | Offset: 45, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_45'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 45
    # safety_related_text | Offset: 48, Length: 1296, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Safety Related Text'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 48
    return data_raw


def is_fast_pgn_129803() -> bool:
    """Return True if PGN 129803 is a fast PGN."""
    return True
def decode_pgn_129803(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129803."""
    nmea2000Message = NMEA2000Message(129803, 'aisInterrogation', 'AIS Interrogation')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    source_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # reserved_40 | Offset: 40, Length: 1, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0x1
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    # ais_transceiver_information | Offset: 41, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 41) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # spare | Offset: 46, Length: 2, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 46) & 0x3
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # destination_id_1 | Offset: 48, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    destination_id_1_raw = (data_raw >> 48) & 0xFFFFFFFF
    destination_id_1 = destination_id_1_raw * 1 if destination_id_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('destination_id_1', 'Destination ID 1', "", '', destination_id_1, destination_id_1_raw))

    # message_id_1_1 | Offset: 80, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_1_1_raw = (data_raw >> 80) & 0x3F
    message_id_1_1 = lookup_AIS_MESSAGE_ID(message_id_1_1_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id_1_1', 'Message ID 1.1', "", '', message_id_1_1, message_id_1_1_raw))

    # slot_offset_1_1 | Offset: 86, Length: 12, Resolution: 1, Field Type: NUMBER, Match: 
    slot_offset_1_1_raw = decode_number((data_raw >> 86) & 0xFFF, 12)
    slot_offset_1_1 = slot_offset_1_1_raw * 1 if slot_offset_1_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('slot_offset_1_1', 'Slot Offset 1.1', "", '', slot_offset_1_1, slot_offset_1_1_raw))

    # spare | Offset: 98, Length: 2, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 98) & 0x3
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # message_id_1_2 | Offset: 100, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_1_2_raw = (data_raw >> 100) & 0x3F
    message_id_1_2 = lookup_AIS_MESSAGE_ID(message_id_1_2_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id_1_2', 'Message ID 1.2', "", '', message_id_1_2, message_id_1_2_raw))

    # slot_offset_1_2 | Offset: 106, Length: 12, Resolution: 1, Field Type: NUMBER, Match: 
    slot_offset_1_2_raw = decode_number((data_raw >> 106) & 0xFFF, 12)
    slot_offset_1_2 = slot_offset_1_2_raw * 1 if slot_offset_1_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('slot_offset_1_2', 'Slot Offset 1.2', "", '', slot_offset_1_2, slot_offset_1_2_raw))

    # spare | Offset: 118, Length: 2, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 118) & 0x3
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # destination_id_2 | Offset: 120, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    destination_id_2_raw = (data_raw >> 120) & 0xFFFFFFFF
    destination_id_2 = destination_id_2_raw * 1 if destination_id_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('destination_id_2', 'Destination ID 2', "", '', destination_id_2, destination_id_2_raw))

    # message_id_2_1 | Offset: 152, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_2_1_raw = (data_raw >> 152) & 0x3F
    message_id_2_1 = lookup_AIS_MESSAGE_ID(message_id_2_1_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id_2_1', 'Message ID 2.1', "", '', message_id_2_1, message_id_2_1_raw))

    # slot_offset_2_1 | Offset: 158, Length: 12, Resolution: 1, Field Type: NUMBER, Match: 
    slot_offset_2_1_raw = decode_number((data_raw >> 158) & 0xFFF, 12)
    slot_offset_2_1 = slot_offset_2_1_raw * 1 if slot_offset_2_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('slot_offset_2_1', 'Slot Offset 2.1', "", '', slot_offset_2_1, slot_offset_2_1_raw))

    # spare | Offset: 170, Length: 2, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 170) & 0x3
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # reserved_172 | Offset: 172, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_172_raw = (data_raw >> 172) & 0xF
    reserved_172 = reserved_172_raw * 1 if reserved_172_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_172', 'Reserved', "", '', reserved_172, reserved_172_raw))

    # sid | Offset: 176, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 176) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    return nmea2000Message

def encode_pgn_129803(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129803."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # reserved_40 | Offset: 40, Length: 1, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1) << 40
    # ais_transceiver_information | Offset: 41, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 41
    # spare | Offset: 46, Length: 2, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0x3) << 46
    # destination_id_1 | Offset: 48, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'destination_id_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination ID 1'")
    data_raw |= (field_value & 0xFFFFFFFF) << 48
    # message_id_1_1 | Offset: 80, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id_1_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID 1.1'")
    data_raw |= (field_value & 0x3F) << 80
    # slot_offset_1_1 | Offset: 86, Length: 12, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'slot_offset_1_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Slot Offset 1.1'")
    data_raw |= (field_value & 0xFFF) << 86
    # spare | Offset: 98, Length: 2, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0x3) << 98
    # message_id_1_2 | Offset: 100, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id_1_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID 1.2'")
    data_raw |= (field_value & 0x3F) << 100
    # slot_offset_1_2 | Offset: 106, Length: 12, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'slot_offset_1_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Slot Offset 1.2'")
    data_raw |= (field_value & 0xFFF) << 106
    # spare | Offset: 118, Length: 2, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0x3) << 118
    # destination_id_2 | Offset: 120, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'destination_id_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination ID 2'")
    data_raw |= (field_value & 0xFFFFFFFF) << 120
    # message_id_2_1 | Offset: 152, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id_2_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID 2.1'")
    data_raw |= (field_value & 0x3F) << 152
    # slot_offset_2_1 | Offset: 158, Length: 12, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'slot_offset_2_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Slot Offset 2.1'")
    data_raw |= (field_value & 0xFFF) << 158
    # spare | Offset: 170, Length: 2, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0x3) << 170
    # reserved_172 | Offset: 172, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_172'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 172
    # sid | Offset: 176, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 176
    return data_raw


def is_fast_pgn_129804() -> bool:
    """Return True if PGN 129804 is a fast PGN."""
    return True
def decode_pgn_129804(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129804."""
    nmea2000Message = NMEA2000Message(129804, 'aisAssignmentModeCommand', 'AIS Assignment Mode Command')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    source_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # ais_transceiver_information | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 40) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # reserved_45 | Offset: 45, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_45_raw = (data_raw >> 45) & 0x7
    reserved_45 = reserved_45_raw * 1 if reserved_45_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_45', 'Reserved', "", '', reserved_45, reserved_45_raw))

    # destination_id_a | Offset: 48, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    destination_id_a_raw = (data_raw >> 48) & 0xFFFFFFFF
    destination_id_a = destination_id_a_raw * 1 if destination_id_a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('destination_id_a', 'Destination ID A', "", '', destination_id_a, destination_id_a_raw))

    # offset_a | Offset: 80, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    offset_a_raw = decode_number((data_raw >> 80) & 0xFFFF, 16)
    offset_a = offset_a_raw * 1 if offset_a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('offset_a', 'Offset A', "", '', offset_a, offset_a_raw))

    # increment_a | Offset: 96, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    increment_a_raw = decode_number((data_raw >> 96) & 0xFFFF, 16)
    increment_a = increment_a_raw * 1 if increment_a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('increment_a', 'Increment A', "", '', increment_a, increment_a_raw))

    # destination_id_b | Offset: 112, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    destination_id_b_raw = (data_raw >> 112) & 0xFFFFFFFF
    destination_id_b = destination_id_b_raw * 1 if destination_id_b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('destination_id_b', 'Destination ID B', "", '', destination_id_b, destination_id_b_raw))

    # offset_b | Offset: 144, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    offset_b_raw = decode_number((data_raw >> 144) & 0xFFFF, 16)
    offset_b = offset_b_raw * 1 if offset_b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('offset_b', 'Offset B', "", '', offset_b, offset_b_raw))

    # increment_b | Offset: 160, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    increment_b_raw = decode_number((data_raw >> 160) & 0xFFFF, 16)
    increment_b = increment_b_raw * 1 if increment_b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('increment_b', 'Increment B', "", '', increment_b, increment_b_raw))

    return nmea2000Message

def encode_pgn_129804(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129804."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # ais_transceiver_information | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 40
    # reserved_45 | Offset: 45, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_45'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 45
    # destination_id_a | Offset: 48, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'destination_id_a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination ID A'")
    data_raw |= (field_value & 0xFFFFFFFF) << 48
    # offset_a | Offset: 80, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'offset_a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Offset A'")
    data_raw |= (field_value & 0xFFFF) << 80
    # increment_a | Offset: 96, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'increment_a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Increment A'")
    data_raw |= (field_value & 0xFFFF) << 96
    # destination_id_b | Offset: 112, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'destination_id_b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Destination ID B'")
    data_raw |= (field_value & 0xFFFFFFFF) << 112
    # offset_b | Offset: 144, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'offset_b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Offset B'")
    data_raw |= (field_value & 0xFFFF) << 144
    # increment_b | Offset: 160, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'increment_b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Increment B'")
    data_raw |= (field_value & 0xFFFF) << 160
    return data_raw


def is_fast_pgn_129805() -> bool:
    """Return True if PGN 129805 is a fast PGN."""
    return True
def decode_pgn_129805(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129805."""
    nmea2000Message = NMEA2000Message(129805, 'aisDataLinkManagementMessage', 'AIS Data Link Management Message')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    source_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # ais_transceiver_information | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 40) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # reserved_45 | Offset: 45, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_45_raw = (data_raw >> 45) & 0x7
    reserved_45 = reserved_45_raw * 1 if reserved_45_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_45', 'Reserved', "", '', reserved_45, reserved_45_raw))

    # offset | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    offset_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    offset = offset_raw * 1 if offset_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('offset', 'Offset', "", '', offset, offset_raw))

    # number_of_slots | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_slots_raw = decode_number((data_raw >> 64) & 0xFF, 8)
    number_of_slots = number_of_slots_raw * 1 if number_of_slots_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_slots', 'Number of Slots', "", '', number_of_slots, number_of_slots_raw))

    # timeout | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    timeout_raw = decode_number((data_raw >> 72) & 0xFF, 8)
    timeout = timeout_raw * 1 if timeout_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('timeout', 'Timeout', "", '', timeout, timeout_raw))

    # increment | Offset: 80, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    increment_raw = decode_number((data_raw >> 80) & 0xFFFF, 16)
    increment = increment_raw * 1 if increment_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('increment', 'Increment', "", '', increment, increment_raw))

    return nmea2000Message

def encode_pgn_129805(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129805."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # ais_transceiver_information | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 40
    # reserved_45 | Offset: 45, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_45'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 45
    # offset | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Offset'")
    data_raw |= (field_value & 0xFFFF) << 48
    # number_of_slots | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_slots'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Slots'")
    data_raw |= (field_value & 0xFF) << 64
    # timeout | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'timeout'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Timeout'")
    data_raw |= (field_value & 0xFF) << 72
    # increment | Offset: 80, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'increment'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Increment'")
    data_raw |= (field_value & 0xFFFF) << 80
    return data_raw


def is_fast_pgn_129806() -> bool:
    """Return True if PGN 129806 is a fast PGN."""
    return True
def decode_pgn_129806(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129806."""
    nmea2000Message = NMEA2000Message(129806, 'aisChannelManagement', 'AIS Channel Management')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    source_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # ais_transceiver_information | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 40) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # reserved_45 | Offset: 45, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_45_raw = (data_raw >> 45) & 0x7
    reserved_45 = reserved_45_raw * 1 if reserved_45_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_45', 'Reserved', "", '', reserved_45, reserved_45_raw))

    # channel_a | Offset: 48, Length: 7, Resolution: 1, Field Type: NUMBER, Match: 
    channel_a_raw = decode_number((data_raw >> 48) & 0x7F, 7)
    channel_a = channel_a_raw * 1 if channel_a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('channel_a', 'Channel A', "", '', channel_a, channel_a_raw))

    # channel_b | Offset: 55, Length: 7, Resolution: 1, Field Type: NUMBER, Match: 
    channel_b_raw = decode_number((data_raw >> 55) & 0x7F, 7)
    channel_b = channel_b_raw * 1 if channel_b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('channel_b', 'Channel B', "", '', channel_b, channel_b_raw))

    # reserved_62 | Offset: 62, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_62_raw = (data_raw >> 62) & 0x3
    reserved_62 = reserved_62_raw * 1 if reserved_62_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_62', 'Reserved', "", '', reserved_62, reserved_62_raw))

    # power | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    power_raw = decode_number((data_raw >> 64) & 0xFF, 8)
    power = power_raw * 1 if power_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('power', 'Power', "reserved", '', power, power_raw))

    # tx_rx_mode | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    tx_rx_mode_raw = decode_number((data_raw >> 72) & 0xFF, 8)
    tx_rx_mode = tx_rx_mode_raw * 1 if tx_rx_mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('tx_rx_mode', 'Tx/Rx Mode', "", '', tx_rx_mode, tx_rx_mode_raw))

    # north_east_longitude_corner_1 | Offset: 80, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    north_east_longitude_corner_1_raw = decode_number((data_raw >> 80) & 0xFFFFFFFF, 32)
    if north_east_longitude_corner_1_raw is not None and north_east_longitude_corner_1_raw & (1 << (32 - 1)):
        north_east_longitude_corner_1_raw -= (1 << 32)
    north_east_longitude_corner_1 = north_east_longitude_corner_1_raw * 1e-07 if north_east_longitude_corner_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('north_east_longitude_corner_1', 'North East Longitude Corner 1', "", 'deg', north_east_longitude_corner_1, north_east_longitude_corner_1_raw))

    # north_east_latitude_corner_1 | Offset: 112, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    north_east_latitude_corner_1_raw = decode_number((data_raw >> 112) & 0xFFFFFFFF, 32)
    if north_east_latitude_corner_1_raw is not None and north_east_latitude_corner_1_raw & (1 << (32 - 1)):
        north_east_latitude_corner_1_raw -= (1 << 32)
    north_east_latitude_corner_1 = north_east_latitude_corner_1_raw * 1e-07 if north_east_latitude_corner_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('north_east_latitude_corner_1', 'North East Latitude Corner 1', "", 'deg', north_east_latitude_corner_1, north_east_latitude_corner_1_raw))

    # south_west_longitude_corner_1 | Offset: 144, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    south_west_longitude_corner_1_raw = decode_number((data_raw >> 144) & 0xFFFFFFFF, 32)
    if south_west_longitude_corner_1_raw is not None and south_west_longitude_corner_1_raw & (1 << (32 - 1)):
        south_west_longitude_corner_1_raw -= (1 << 32)
    south_west_longitude_corner_1 = south_west_longitude_corner_1_raw * 1e-07 if south_west_longitude_corner_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('south_west_longitude_corner_1', 'South West Longitude Corner 1', "", 'deg', south_west_longitude_corner_1, south_west_longitude_corner_1_raw))

    # south_west_latitude_corner_2 | Offset: 176, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    south_west_latitude_corner_2_raw = decode_number((data_raw >> 176) & 0xFFFFFFFF, 32)
    if south_west_latitude_corner_2_raw is not None and south_west_latitude_corner_2_raw & (1 << (32 - 1)):
        south_west_latitude_corner_2_raw -= (1 << 32)
    south_west_latitude_corner_2 = south_west_latitude_corner_2_raw * 1e-07 if south_west_latitude_corner_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('south_west_latitude_corner_2', 'South West Latitude Corner 2', "", 'deg', south_west_latitude_corner_2, south_west_latitude_corner_2_raw))

    # reserved_208 | Offset: 208, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_208_raw = (data_raw >> 208) & 0x3F
    reserved_208 = reserved_208_raw * 1 if reserved_208_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_208', 'Reserved', "", '', reserved_208, reserved_208_raw))

    # addressed_or_broadcast_message_indicator | Offset: 214, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    addressed_or_broadcast_message_indicator_raw = decode_number((data_raw >> 214) & 0x3, 2)
    addressed_or_broadcast_message_indicator = addressed_or_broadcast_message_indicator_raw * 1 if addressed_or_broadcast_message_indicator_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('addressed_or_broadcast_message_indicator', 'Addressed or Broadcast Message Indicator', "", '', addressed_or_broadcast_message_indicator, addressed_or_broadcast_message_indicator_raw))

    # channel_a_bandwidth | Offset: 216, Length: 7, Resolution: 1, Field Type: NUMBER, Match: 
    channel_a_bandwidth_raw = decode_number((data_raw >> 216) & 0x7F, 7)
    channel_a_bandwidth = channel_a_bandwidth_raw * 1 if channel_a_bandwidth_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('channel_a_bandwidth', 'Channel A Bandwidth', "", '', channel_a_bandwidth, channel_a_bandwidth_raw))

    # channel_b_bandwidth | Offset: 223, Length: 7, Resolution: 1, Field Type: NUMBER, Match: 
    channel_b_bandwidth_raw = decode_number((data_raw >> 223) & 0x7F, 7)
    channel_b_bandwidth = channel_b_bandwidth_raw * 1 if channel_b_bandwidth_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('channel_b_bandwidth', 'Channel B Bandwidth', "", '', channel_b_bandwidth, channel_b_bandwidth_raw))

    # reserved_230 | Offset: 230, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_230_raw = (data_raw >> 230) & 0x3
    reserved_230 = reserved_230_raw * 1 if reserved_230_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_230', 'Reserved', "", '', reserved_230, reserved_230_raw))

    # transitional_zone_size | Offset: 232, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    transitional_zone_size_raw = decode_number((data_raw >> 232) & 0xFF, 8)
    transitional_zone_size = transitional_zone_size_raw * 1 if transitional_zone_size_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('transitional_zone_size', 'Transitional Zone Size', "", '', transitional_zone_size, transitional_zone_size_raw))

    return nmea2000Message

def encode_pgn_129806(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129806."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # ais_transceiver_information | Offset: 40, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 40
    # reserved_45 | Offset: 45, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_45'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 45
    # channel_a | Offset: 48, Length: 7, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'channel_a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Channel A'")
    data_raw |= (field_value & 0x7F) << 48
    # channel_b | Offset: 55, Length: 7, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'channel_b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Channel B'")
    data_raw |= (field_value & 0x7F) << 55
    # reserved_62 | Offset: 62, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_62'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 62
    # power | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power'")
    data_raw |= (field_value & 0xFF) << 64
    # tx_rx_mode | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'tx_rx_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Tx/Rx Mode'")
    data_raw |= (field_value & 0xFF) << 72
    # north_east_longitude_corner_1 | Offset: 80, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'north_east_longitude_corner_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'North East Longitude Corner 1'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 80
    
    # north_east_latitude_corner_1 | Offset: 112, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'north_east_latitude_corner_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'North East Latitude Corner 1'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 112
    
    # south_west_longitude_corner_1 | Offset: 144, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'south_west_longitude_corner_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'South West Longitude Corner 1'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 144
    
    # south_west_latitude_corner_2 | Offset: 176, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'south_west_latitude_corner_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'South West Latitude Corner 2'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 176
    
    # reserved_208 | Offset: 208, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_208'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 208
    # addressed_or_broadcast_message_indicator | Offset: 214, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'addressed_or_broadcast_message_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Addressed or Broadcast Message Indicator'")
    data_raw |= (field_value & 0x3) << 214
    # channel_a_bandwidth | Offset: 216, Length: 7, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'channel_a_bandwidth'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Channel A Bandwidth'")
    data_raw |= (field_value & 0x7F) << 216
    # channel_b_bandwidth | Offset: 223, Length: 7, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'channel_b_bandwidth'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Channel B Bandwidth'")
    data_raw |= (field_value & 0x7F) << 223
    # reserved_230 | Offset: 230, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_230'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 230
    # transitional_zone_size | Offset: 232, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'transitional_zone_size'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Transitional Zone Size'")
    data_raw |= (field_value & 0xFF) << 232
    return data_raw


def is_fast_pgn_129807() -> bool:
    """Return True if PGN 129807 is a fast PGN."""
    return True
def decode_pgn_129807(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129807."""
    nmea2000Message = NMEA2000Message(129807, 'aisClassBGroupAssignment', 'AIS Class B Group Assignment')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    source_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # spare | Offset: 40, Length: 2, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 40) & 0x3
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # tx_rx_mode | Offset: 42, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    tx_rx_mode_raw = (data_raw >> 42) & 0xF
    tx_rx_mode = lookup_TX_RX_MODE(tx_rx_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('tx_rx_mode', 'Tx/Rx Mode', "", '', tx_rx_mode, tx_rx_mode_raw))

    # reserved_46 | Offset: 46, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_46_raw = (data_raw >> 46) & 0x3
    reserved_46 = reserved_46_raw * 1 if reserved_46_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_46', 'Reserved', "", '', reserved_46, reserved_46_raw))

    # north_east_longitude_corner_1 | Offset: 48, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    north_east_longitude_corner_1_raw = decode_number((data_raw >> 48) & 0xFFFFFFFF, 32)
    if north_east_longitude_corner_1_raw is not None and north_east_longitude_corner_1_raw & (1 << (32 - 1)):
        north_east_longitude_corner_1_raw -= (1 << 32)
    north_east_longitude_corner_1 = north_east_longitude_corner_1_raw * 1e-07 if north_east_longitude_corner_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('north_east_longitude_corner_1', 'North East Longitude Corner 1', "", 'deg', north_east_longitude_corner_1, north_east_longitude_corner_1_raw))

    # north_east_latitude_corner_1 | Offset: 80, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    north_east_latitude_corner_1_raw = decode_number((data_raw >> 80) & 0xFFFFFFFF, 32)
    if north_east_latitude_corner_1_raw is not None and north_east_latitude_corner_1_raw & (1 << (32 - 1)):
        north_east_latitude_corner_1_raw -= (1 << 32)
    north_east_latitude_corner_1 = north_east_latitude_corner_1_raw * 1e-07 if north_east_latitude_corner_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('north_east_latitude_corner_1', 'North East Latitude Corner 1', "", 'deg', north_east_latitude_corner_1, north_east_latitude_corner_1_raw))

    # south_west_longitude_corner_1 | Offset: 112, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    south_west_longitude_corner_1_raw = decode_number((data_raw >> 112) & 0xFFFFFFFF, 32)
    if south_west_longitude_corner_1_raw is not None and south_west_longitude_corner_1_raw & (1 << (32 - 1)):
        south_west_longitude_corner_1_raw -= (1 << 32)
    south_west_longitude_corner_1 = south_west_longitude_corner_1_raw * 1e-07 if south_west_longitude_corner_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('south_west_longitude_corner_1', 'South West Longitude Corner 1', "", 'deg', south_west_longitude_corner_1, south_west_longitude_corner_1_raw))

    # south_west_latitude_corner_2 | Offset: 144, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    south_west_latitude_corner_2_raw = decode_number((data_raw >> 144) & 0xFFFFFFFF, 32)
    if south_west_latitude_corner_2_raw is not None and south_west_latitude_corner_2_raw & (1 << (32 - 1)):
        south_west_latitude_corner_2_raw -= (1 << 32)
    south_west_latitude_corner_2 = south_west_latitude_corner_2_raw * 1e-07 if south_west_latitude_corner_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('south_west_latitude_corner_2', 'South West Latitude Corner 2', "", 'deg', south_west_latitude_corner_2, south_west_latitude_corner_2_raw))

    # station_type | Offset: 176, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    station_type_raw = (data_raw >> 176) & 0xF
    station_type = lookup_STATION_TYPE(station_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('station_type', 'Station Type', "", '', station_type, station_type_raw))

    # reserved_180 | Offset: 180, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_180_raw = (data_raw >> 180) & 0xF
    reserved_180 = reserved_180_raw * 1 if reserved_180_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_180', 'Reserved', "", '', reserved_180, reserved_180_raw))

    # ship_and_cargo_filter | Offset: 184, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    ship_and_cargo_filter_raw = decode_number((data_raw >> 184) & 0xFF, 8)
    ship_and_cargo_filter = ship_and_cargo_filter_raw * 1 if ship_and_cargo_filter_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ship_and_cargo_filter', 'Ship and Cargo Filter', "", '', ship_and_cargo_filter, ship_and_cargo_filter_raw))

    # spare | Offset: 192, Length: 22, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 192) & 0x3FFFFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # reserved_214 | Offset: 214, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_214_raw = (data_raw >> 214) & 0x3
    reserved_214 = reserved_214_raw * 1 if reserved_214_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_214', 'Reserved', "", '', reserved_214, reserved_214_raw))

    # reporting_interval | Offset: 216, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    reporting_interval_raw = (data_raw >> 216) & 0xF
    reporting_interval = lookup_REPORTING_INTERVAL(reporting_interval_raw)
    nmea2000Message.fields.append(NMEA2000Field('reporting_interval', 'Reporting Interval', "", '', reporting_interval, reporting_interval_raw))

    # quiet_time | Offset: 220, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    quiet_time_raw = decode_number((data_raw >> 220) & 0xF, 4)
    quiet_time = quiet_time_raw * 1 if quiet_time_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('quiet_time', 'Quiet Time', "", '', quiet_time, quiet_time_raw))

    return nmea2000Message

def encode_pgn_129807(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129807."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # source_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # spare | Offset: 40, Length: 2, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0x3) << 40
    # tx_rx_mode | Offset: 42, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TX_RX_MODE(f.value) for f in nmea2000Message.fields if f.id == 'tx_rx_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Tx/Rx Mode'")
    data_raw |= (field_value & 0xF) << 42
    # reserved_46 | Offset: 46, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_46'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 46
    # north_east_longitude_corner_1 | Offset: 48, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'north_east_longitude_corner_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'North East Longitude Corner 1'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 48
    
    # north_east_latitude_corner_1 | Offset: 80, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'north_east_latitude_corner_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'North East Latitude Corner 1'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 80
    
    # south_west_longitude_corner_1 | Offset: 112, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'south_west_longitude_corner_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'South West Longitude Corner 1'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 112
    
    # south_west_latitude_corner_2 | Offset: 144, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'south_west_latitude_corner_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'South West Latitude Corner 2'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 144
    
    # station_type | Offset: 176, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_STATION_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'station_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station Type'")
    data_raw |= (field_value & 0xF) << 176
    # reserved_180 | Offset: 180, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_180'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 180
    # ship_and_cargo_filter | Offset: 184, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ship_and_cargo_filter'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Ship and Cargo Filter'")
    data_raw |= (field_value & 0xFF) << 184
    # spare | Offset: 192, Length: 22, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0x3FFFFF) << 192
    # reserved_214 | Offset: 214, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_214'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 214
    # reporting_interval | Offset: 216, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPORTING_INTERVAL(f.value) for f in nmea2000Message.fields if f.id == 'reporting_interval'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reporting Interval'")
    data_raw |= (field_value & 0xF) << 216
    # quiet_time | Offset: 220, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'quiet_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Quiet Time'")
    data_raw |= (field_value & 0xF) << 220
    return data_raw


def is_fast_pgn_129808() -> bool:
    """Return True if PGN 129808 is a fast PGN."""
    return True
# Complex PGN. number of matches: 2
def decode_pgn_129808(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 8) & 0xFF) == 112)
        ):
        return decode_pgn_129808_dscDistressCallInformation(data_raw)
    
    match_ok = True
    if (
        ):
        return decode_pgn_129808_dscCallInformation(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_129808_dscDistressCallInformation(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129808."""
    nmea2000Message = NMEA2000Message(129808, 'dscDistressCallInformation', 'DSC Distress Call Information')
    # dsc_format | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    dsc_format_raw = (data_raw >> 0) & 0xFF
    dsc_format = lookup_DSC_FORMAT(dsc_format_raw)
    nmea2000Message.fields.append(NMEA2000Field('dsc_format', 'DSC Format', "", '', dsc_format, dsc_format_raw))

    # dsc_category | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 112
    dsc_category_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    dsc_category = dsc_category_raw * 1 if dsc_category_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dsc_category', 'DSC Category', "Distress", '', dsc_category, dsc_category_raw))

    # dsc_message_address | Offset: 16, Length: 40, Resolution: 1, Field Type: DECIMAL, Match: 
    dsc_message_address_raw = (data_raw >> 16) & 0xFFFFFFFFFF
    dsc_message_address = dsc_message_address_raw * 1 if dsc_message_address_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dsc_message_address', 'DSC Message Address', "MMSI, Geographic Area or blank", '', dsc_message_address, dsc_message_address_raw))

    # nature_of_distress | Offset: 56, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    nature_of_distress_raw = (data_raw >> 56) & 0xFF
    nature_of_distress = lookup_DSC_NATURE(nature_of_distress_raw)
    nmea2000Message.fields.append(NMEA2000Field('nature_of_distress', 'Nature of Distress', "", '', nature_of_distress, nature_of_distress_raw))

    # subsequent_communication_mode_or_2nd_telecommand | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    subsequent_communication_mode_or_2nd_telecommand_raw = (data_raw >> 64) & 0xFF
    subsequent_communication_mode_or_2nd_telecommand = lookup_DSC_SECOND_TELECOMMAND(subsequent_communication_mode_or_2nd_telecommand_raw)
    nmea2000Message.fields.append(NMEA2000Field('subsequent_communication_mode_or_2nd_telecommand', 'Subsequent Communication Mode or 2nd Telecommand', "", '', subsequent_communication_mode_or_2nd_telecommand, subsequent_communication_mode_or_2nd_telecommand_raw))

    # proposed_rx_frequency_channel | Offset: 72, Length: 48, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # proposed_tx_frequency_channel | Offset: 120, Length: 48, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types
















    return nmea2000Message

def encode_pgn_129808_dscDistressCallInformation(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129808."""
    data_raw = 0
    # dsc_format | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DSC_FORMAT(f.value) for f in nmea2000Message.fields if f.id == 'dsc_format'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DSC Format'")
    data_raw |= (field_value & 0xFF) << 0
    # dsc_category | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dsc_category'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DSC Category'")
    data_raw |= (field_value & 0xFF) << 8
    # dsc_message_address | Offset: 16, Length: 40, Resolution: 1, Field Type: DECIMAL
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dsc_message_address'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DSC Message Address'")
    data_raw |= (field_value & 0xFFFFFFFFFF) << 16
    # nature_of_distress | Offset: 56, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DSC_NATURE(f.value) for f in nmea2000Message.fields if f.id == 'nature_of_distress'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Nature of Distress'")
    data_raw |= (field_value & 0xFF) << 56
    # subsequent_communication_mode_or_2nd_telecommand | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DSC_SECOND_TELECOMMAND(f.value) for f in nmea2000Message.fields if f.id == 'subsequent_communication_mode_or_2nd_telecommand'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Subsequent Communication Mode or 2nd Telecommand'")
    data_raw |= (field_value & 0xFF) << 64
    # proposed_rx_frequency_channel | Offset: 72, Length: 48, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proposed Rx Frequency/Channel'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 72
    # proposed_tx_frequency_channel | Offset: 120, Length: 48, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proposed Tx Frequency/Channel'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 120
    raise Exception ("PGN 129808 not supporting encoding for now as Telephone Number is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Latitude of Vessel Reported is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Longitude of Vessel Reported is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Time of Position is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as MMSI of Ship In Distress is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as DSC EOS Symbol is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Expansion Enabled is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Calling Rx Frequency/Channel is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Calling Tx Frequency/Channel is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Time of Receipt is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Date of Receipt is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as DSC Equipment Assigned Message ID is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as DSC Expansion Field Symbol is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as DSC Expansion Field Data is missing BitLength or BitOffset")
    return data_raw

def decode_pgn_129808_dscCallInformation(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129808."""
    nmea2000Message = NMEA2000Message(129808, 'dscCallInformation', 'DSC Call Information')
    # dsc_format_symbol | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    dsc_format_symbol_raw = (data_raw >> 0) & 0xFF
    dsc_format_symbol = lookup_DSC_FORMAT(dsc_format_symbol_raw)
    nmea2000Message.fields.append(NMEA2000Field('dsc_format_symbol', 'DSC Format Symbol', "", '', dsc_format_symbol, dsc_format_symbol_raw))

    # dsc_category_symbol | Offset: 8, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    dsc_category_symbol_raw = (data_raw >> 8) & 0xFF
    dsc_category_symbol = lookup_DSC_CATEGORY(dsc_category_symbol_raw)
    nmea2000Message.fields.append(NMEA2000Field('dsc_category_symbol', 'DSC Category Symbol', "", '', dsc_category_symbol, dsc_category_symbol_raw))

    # dsc_message_address | Offset: 16, Length: 40, Resolution: 1, Field Type: DECIMAL, Match: 
    dsc_message_address_raw = (data_raw >> 16) & 0xFFFFFFFFFF
    dsc_message_address = dsc_message_address_raw * 1 if dsc_message_address_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dsc_message_address', 'DSC Message Address', "MMSI, Geographic Area or blank", '', dsc_message_address, dsc_message_address_raw))

    # __1st_telecommand | Offset: 56, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    __1st_telecommand_raw = (data_raw >> 56) & 0xFF
    __1st_telecommand = lookup_DSC_FIRST_TELECOMMAND(__1st_telecommand_raw)
    nmea2000Message.fields.append(NMEA2000Field('__1st_telecommand', '1st Telecommand', "", '', __1st_telecommand, __1st_telecommand_raw))

    # subsequent_communication_mode_or_2nd_telecommand | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    subsequent_communication_mode_or_2nd_telecommand_raw = (data_raw >> 64) & 0xFF
    subsequent_communication_mode_or_2nd_telecommand = lookup_DSC_SECOND_TELECOMMAND(subsequent_communication_mode_or_2nd_telecommand_raw)
    nmea2000Message.fields.append(NMEA2000Field('subsequent_communication_mode_or_2nd_telecommand', 'Subsequent Communication Mode or 2nd Telecommand', "", '', subsequent_communication_mode_or_2nd_telecommand, subsequent_communication_mode_or_2nd_telecommand_raw))

    # proposed_rx_frequency_channel | Offset: 72, Length: 48, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # proposed_tx_frequency_channel | Offset: 120, Length: 48, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types
















    return nmea2000Message

def encode_pgn_129808_dscCallInformation(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129808."""
    data_raw = 0
    # dsc_format_symbol | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DSC_FORMAT(f.value) for f in nmea2000Message.fields if f.id == 'dsc_format_symbol'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DSC Format Symbol'")
    data_raw |= (field_value & 0xFF) << 0
    # dsc_category_symbol | Offset: 8, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DSC_CATEGORY(f.value) for f in nmea2000Message.fields if f.id == 'dsc_category_symbol'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DSC Category Symbol'")
    data_raw |= (field_value & 0xFF) << 8
    # dsc_message_address | Offset: 16, Length: 40, Resolution: 1, Field Type: DECIMAL
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dsc_message_address'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'DSC Message Address'")
    data_raw |= (field_value & 0xFFFFFFFFFF) << 16
    # __1st_telecommand | Offset: 56, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DSC_FIRST_TELECOMMAND(f.value) for f in nmea2000Message.fields if f.id == '__1st_telecommand'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing '1st Telecommand'")
    data_raw |= (field_value & 0xFF) << 56
    # subsequent_communication_mode_or_2nd_telecommand | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DSC_SECOND_TELECOMMAND(f.value) for f in nmea2000Message.fields if f.id == 'subsequent_communication_mode_or_2nd_telecommand'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Subsequent Communication Mode or 2nd Telecommand'")
    data_raw |= (field_value & 0xFF) << 64
    # proposed_rx_frequency_channel | Offset: 72, Length: 48, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proposed Rx Frequency/Channel'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 72
    # proposed_tx_frequency_channel | Offset: 120, Length: 48, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proposed Tx Frequency/Channel'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 120
    raise Exception ("PGN 129808 not supporting encoding for now as Telephone Number is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Latitude of Vessel Reported is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Longitude of Vessel Reported is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Time of Position is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as MMSI of Ship In Distress is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as DSC EOS Symbol is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Expansion Enabled is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Calling Rx Frequency/Channel is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Calling Tx Frequency/Channel is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Time of Receipt is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as Date of Receipt is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as DSC Equipment Assigned Message ID is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as DSC Expansion Field Symbol is missing BitLength or BitOffset")
    raise Exception ("PGN 129808 not supporting encoding for now as DSC Expansion Field Data is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_129809() -> bool:
    """Return True if PGN 129809 is a fast PGN."""
    return True
def decode_pgn_129809(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129809."""
    nmea2000Message = NMEA2000Message(129809, 'aisClassBStaticDataMsg24PartA', 'AIS Class B static data (msg 24 Part A)')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    user_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    user_id = user_id_raw * 1 if user_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('user_id', 'User ID', "", '', user_id, user_id_raw))

    # name | Offset: 40, Length: 160, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # ais_transceiver_information | Offset: 200, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 200) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # reserved_205 | Offset: 205, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_205_raw = (data_raw >> 205) & 0x7
    reserved_205 = reserved_205_raw * 1 if reserved_205_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_205', 'Reserved', "", '', reserved_205, reserved_205_raw))

    # sequence_id | Offset: 208, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sequence_id_raw = decode_number((data_raw >> 208) & 0xFF, 8)
    sequence_id = sequence_id_raw * 1 if sequence_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sequence_id', 'Sequence ID', "", '', sequence_id, sequence_id_raw))

    return nmea2000Message

def encode_pgn_129809(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129809."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'user_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'User ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # name | Offset: 40, Length: 160, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Name'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 40
    # ais_transceiver_information | Offset: 200, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 200
    # reserved_205 | Offset: 205, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_205'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 205
    # sequence_id | Offset: 208, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sequence_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sequence ID'")
    data_raw |= (field_value & 0xFF) << 208
    return data_raw


def is_fast_pgn_129810() -> bool:
    """Return True if PGN 129810 is a fast PGN."""
    return True
def decode_pgn_129810(data_raw: int) -> NMEA2000Message:
    """Decode PGN 129810."""
    nmea2000Message = NMEA2000Message(129810, 'aisClassBStaticDataMsg24PartB', 'AIS Class B static data (msg 24 Part B)')
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    message_id_raw = (data_raw >> 0) & 0x3F
    message_id = lookup_AIS_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 6) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    user_id_raw = (data_raw >> 8) & 0xFFFFFFFF
    user_id = user_id_raw * 1 if user_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('user_id', 'User ID', "", '', user_id, user_id_raw))

    # type_of_ship | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    type_of_ship_raw = (data_raw >> 40) & 0xFF
    type_of_ship = lookup_SHIP_TYPE(type_of_ship_raw)
    nmea2000Message.fields.append(NMEA2000Field('type_of_ship', 'Type of ship', "", '', type_of_ship, type_of_ship_raw))

    # vendor_id | Offset: 48, Length: 56, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # callsign | Offset: 104, Length: 56, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # length | Offset: 160, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    length_raw = decode_number((data_raw >> 160) & 0xFFFF, 16)
    length = length_raw * 0.1 if length_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('length', 'Length', "", 'm', length, length_raw))

    # beam | Offset: 176, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    beam_raw = decode_number((data_raw >> 176) & 0xFFFF, 16)
    beam = beam_raw * 0.1 if beam_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('beam', 'Beam', "", 'm', beam, beam_raw))

    # position_reference_from_starboard | Offset: 192, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    position_reference_from_starboard_raw = decode_number((data_raw >> 192) & 0xFFFF, 16)
    position_reference_from_starboard = position_reference_from_starboard_raw * 0.1 if position_reference_from_starboard_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('position_reference_from_starboard', 'Position reference from Starboard', "", 'm', position_reference_from_starboard, position_reference_from_starboard_raw))

    # position_reference_from_bow | Offset: 208, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    position_reference_from_bow_raw = decode_number((data_raw >> 208) & 0xFFFF, 16)
    position_reference_from_bow = position_reference_from_bow_raw * 0.1 if position_reference_from_bow_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('position_reference_from_bow', 'Position reference from Bow', "", 'm', position_reference_from_bow, position_reference_from_bow_raw))

    # mothership_user_id | Offset: 224, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    mothership_user_id_raw = (data_raw >> 224) & 0xFFFFFFFF
    mothership_user_id = mothership_user_id_raw * 1 if mothership_user_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('mothership_user_id', 'Mothership User ID', "", '', mothership_user_id, mothership_user_id_raw))

    # reserved_256 | Offset: 256, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_256_raw = (data_raw >> 256) & 0x3
    reserved_256 = reserved_256_raw * 1 if reserved_256_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_256', 'Reserved', "", '', reserved_256, reserved_256_raw))

    # spare | Offset: 258, Length: 2, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 258) & 0x3
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # gnss_type | Offset: 260, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    gnss_type_raw = (data_raw >> 260) & 0xF
    gnss_type = lookup_POSITION_FIX_DEVICE(gnss_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('gnss_type', 'GNSS type', "", '', gnss_type, gnss_type_raw))

    # ais_transceiver_information | Offset: 264, Length: 5, Resolution: 1, Field Type: LOOKUP, Match: 
    ais_transceiver_information_raw = (data_raw >> 264) & 0x1F
    ais_transceiver_information = lookup_AIS_TRANSCEIVER(ais_transceiver_information_raw)
    nmea2000Message.fields.append(NMEA2000Field('ais_transceiver_information', 'AIS Transceiver information', "", '', ais_transceiver_information, ais_transceiver_information_raw))

    # reserved_269 | Offset: 269, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_269_raw = (data_raw >> 269) & 0x7
    reserved_269 = reserved_269_raw * 1 if reserved_269_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_269', 'Reserved', "", '', reserved_269, reserved_269_raw))

    # sequence_id | Offset: 272, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sequence_id_raw = decode_number((data_raw >> 272) & 0xFF, 8)
    sequence_id = sequence_id_raw * 1 if sequence_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sequence_id', 'Sequence ID', "", '', sequence_id, sequence_id_raw))

    return nmea2000Message

def encode_pgn_129810(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 129810."""
    data_raw = 0
    # message_id | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 0
    # repeat_indicator | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 6
    # user_id | Offset: 8, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'user_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'User ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 8
    # type_of_ship | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SHIP_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'type_of_ship'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Type of ship'")
    data_raw |= (field_value & 0xFF) << 40
    # vendor_id | Offset: 48, Length: 56, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Vendor ID'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFF) << 48
    # callsign | Offset: 104, Length: 56, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Callsign'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFF) << 104
    # length | Offset: 160, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'length'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Length'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 160
    
    # beam | Offset: 176, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'beam'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Beam'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 176
    
    # position_reference_from_starboard | Offset: 192, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_reference_from_starboard'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position reference from Starboard'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 192
    
    # position_reference_from_bow | Offset: 208, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_reference_from_bow'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position reference from Bow'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 208
    
    # mothership_user_id | Offset: 224, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'mothership_user_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mothership User ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 224
    # reserved_256 | Offset: 256, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_256'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 256
    # spare | Offset: 258, Length: 2, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0x3) << 258
    # gnss_type | Offset: 260, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_POSITION_FIX_DEVICE(f.value) for f in nmea2000Message.fields if f.id == 'gnss_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'GNSS type'")
    data_raw |= (field_value & 0xF) << 260
    # ais_transceiver_information | Offset: 264, Length: 5, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIS_TRANSCEIVER(f.value) for f in nmea2000Message.fields if f.id == 'ais_transceiver_information'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AIS Transceiver information'")
    data_raw |= (field_value & 0x1F) << 264
    # reserved_269 | Offset: 269, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_269'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 269
    # sequence_id | Offset: 272, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sequence_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sequence ID'")
    data_raw |= (field_value & 0xFF) << 272
    return data_raw


def is_fast_pgn_130052() -> bool:
    """Return True if PGN 130052 is a fast PGN."""
    return True
def decode_pgn_130052(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130052."""
    nmea2000Message = NMEA2000Message(130052, 'loranCTdData', 'Loran-C TD Data')
    # group_repetition_interval__gri_ | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    group_repetition_interval__gri__raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if group_repetition_interval__gri__raw is not None and group_repetition_interval__gri__raw & (1 << (32 - 1)):
        group_repetition_interval__gri__raw -= (1 << 32)
    group_repetition_interval__gri_ = group_repetition_interval__gri__raw * 1 if group_repetition_interval__gri__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('group_repetition_interval__gri_', 'Group Repetition Interval (GRI)', "", '', group_repetition_interval__gri_, group_repetition_interval__gri__raw))

    # master_range | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    master_range_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if master_range_raw is not None and master_range_raw & (1 << (32 - 1)):
        master_range_raw -= (1 << 32)
    master_range = master_range_raw * 1 if master_range_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('master_range', 'Master Range', "", '', master_range, master_range_raw))

    # v_secondary_td | Offset: 64, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    v_secondary_td_raw = decode_number((data_raw >> 64) & 0xFFFFFFFF, 32)
    if v_secondary_td_raw is not None and v_secondary_td_raw & (1 << (32 - 1)):
        v_secondary_td_raw -= (1 << 32)
    v_secondary_td = v_secondary_td_raw * 1 if v_secondary_td_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('v_secondary_td', 'V Secondary TD', "", '', v_secondary_td, v_secondary_td_raw))

    # w_secondary_td | Offset: 96, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    w_secondary_td_raw = decode_number((data_raw >> 96) & 0xFFFFFFFF, 32)
    if w_secondary_td_raw is not None and w_secondary_td_raw & (1 << (32 - 1)):
        w_secondary_td_raw -= (1 << 32)
    w_secondary_td = w_secondary_td_raw * 1 if w_secondary_td_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('w_secondary_td', 'W Secondary TD', "", '', w_secondary_td, w_secondary_td_raw))

    # x_secondary_td | Offset: 128, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    x_secondary_td_raw = decode_number((data_raw >> 128) & 0xFFFFFFFF, 32)
    if x_secondary_td_raw is not None and x_secondary_td_raw & (1 << (32 - 1)):
        x_secondary_td_raw -= (1 << 32)
    x_secondary_td = x_secondary_td_raw * 1 if x_secondary_td_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('x_secondary_td', 'X Secondary TD', "", '', x_secondary_td, x_secondary_td_raw))

    # y_secondary_td | Offset: 160, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    y_secondary_td_raw = decode_number((data_raw >> 160) & 0xFFFFFFFF, 32)
    if y_secondary_td_raw is not None and y_secondary_td_raw & (1 << (32 - 1)):
        y_secondary_td_raw -= (1 << 32)
    y_secondary_td = y_secondary_td_raw * 1 if y_secondary_td_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('y_secondary_td', 'Y Secondary TD', "", '', y_secondary_td, y_secondary_td_raw))

    # z_secondary_td | Offset: 192, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    z_secondary_td_raw = decode_number((data_raw >> 192) & 0xFFFFFFFF, 32)
    if z_secondary_td_raw is not None and z_secondary_td_raw & (1 << (32 - 1)):
        z_secondary_td_raw -= (1 << 32)
    z_secondary_td = z_secondary_td_raw * 1 if z_secondary_td_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('z_secondary_td', 'Z Secondary TD', "", '', z_secondary_td, z_secondary_td_raw))

    # station_status__master | Offset: 224, Length: 4, Resolution: 1, Field Type: BITLOOKUP, Match: 
    station_status__master_raw = (data_raw >> 224) & 0xF
    station_status__master = station_status__master_raw * 1 if station_status__master_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_status__master', 'Station status: Master', "", '', station_status__master, station_status__master_raw))

    # station_status__v | Offset: 228, Length: 4, Resolution: 1, Field Type: BITLOOKUP, Match: 
    station_status__v_raw = (data_raw >> 228) & 0xF
    station_status__v = station_status__v_raw * 1 if station_status__v_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_status__v', 'Station status: V', "", '', station_status__v, station_status__v_raw))

    # station_status__w | Offset: 232, Length: 4, Resolution: 1, Field Type: BITLOOKUP, Match: 
    station_status__w_raw = (data_raw >> 232) & 0xF
    station_status__w = station_status__w_raw * 1 if station_status__w_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_status__w', 'Station status: W', "", '', station_status__w, station_status__w_raw))

    # station_status__x | Offset: 236, Length: 4, Resolution: 1, Field Type: BITLOOKUP, Match: 
    station_status__x_raw = (data_raw >> 236) & 0xF
    station_status__x = station_status__x_raw * 1 if station_status__x_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_status__x', 'Station status: X', "", '', station_status__x, station_status__x_raw))

    # station_status__y | Offset: 240, Length: 4, Resolution: 1, Field Type: BITLOOKUP, Match: 
    station_status__y_raw = (data_raw >> 240) & 0xF
    station_status__y = station_status__y_raw * 1 if station_status__y_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_status__y', 'Station status: Y', "", '', station_status__y, station_status__y_raw))

    # station_status__z | Offset: 244, Length: 4, Resolution: 1, Field Type: BITLOOKUP, Match: 
    station_status__z_raw = (data_raw >> 244) & 0xF
    station_status__z = station_status__z_raw * 1 if station_status__z_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_status__z', 'Station status: Z', "", '', station_status__z, station_status__z_raw))

    # mode | Offset: 248, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    mode_raw = (data_raw >> 248) & 0xF
    mode = lookup_RESIDUAL_MODE(mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "", '', mode, mode_raw))

    # reserved_252 | Offset: 252, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_252_raw = (data_raw >> 252) & 0xF
    reserved_252 = reserved_252_raw * 1 if reserved_252_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_252', 'Reserved', "", '', reserved_252, reserved_252_raw))

    return nmea2000Message

def encode_pgn_130052(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130052."""
    data_raw = 0
    # group_repetition_interval__gri_ | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'group_repetition_interval__gri_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group Repetition Interval (GRI)'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # master_range | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'master_range'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Master Range'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    # v_secondary_td | Offset: 64, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'v_secondary_td'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'V Secondary TD'")
    data_raw |= (field_value & 0xFFFFFFFF) << 64
    # w_secondary_td | Offset: 96, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'w_secondary_td'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'W Secondary TD'")
    data_raw |= (field_value & 0xFFFFFFFF) << 96
    # x_secondary_td | Offset: 128, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'x_secondary_td'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'X Secondary TD'")
    data_raw |= (field_value & 0xFFFFFFFF) << 128
    # y_secondary_td | Offset: 160, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'y_secondary_td'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Y Secondary TD'")
    data_raw |= (field_value & 0xFFFFFFFF) << 160
    # z_secondary_td | Offset: 192, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'z_secondary_td'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Z Secondary TD'")
    data_raw |= (field_value & 0xFFFFFFFF) << 192
    # station_status__master | Offset: 224, Length: 4, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_status__master'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station status: Master'")
    data_raw |= (field_value & 0xF) << 224
    # station_status__v | Offset: 228, Length: 4, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_status__v'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station status: V'")
    data_raw |= (field_value & 0xF) << 228
    # station_status__w | Offset: 232, Length: 4, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_status__w'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station status: W'")
    data_raw |= (field_value & 0xF) << 232
    # station_status__x | Offset: 236, Length: 4, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_status__x'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station status: X'")
    data_raw |= (field_value & 0xF) << 236
    # station_status__y | Offset: 240, Length: 4, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_status__y'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station status: Y'")
    data_raw |= (field_value & 0xF) << 240
    # station_status__z | Offset: 244, Length: 4, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_status__z'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station status: Z'")
    data_raw |= (field_value & 0xF) << 244
    # mode | Offset: 248, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RESIDUAL_MODE(f.value) for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xF) << 248
    # reserved_252 | Offset: 252, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_252'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 252
    return data_raw


def is_fast_pgn_130053() -> bool:
    """Return True if PGN 130053 is a fast PGN."""
    return True
def decode_pgn_130053(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130053."""
    nmea2000Message = NMEA2000Message(130053, 'loranCRangeData', 'Loran-C Range Data')
    # group_repetition_interval__gri_ | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    group_repetition_interval__gri__raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if group_repetition_interval__gri__raw is not None and group_repetition_interval__gri__raw & (1 << (32 - 1)):
        group_repetition_interval__gri__raw -= (1 << 32)
    group_repetition_interval__gri_ = group_repetition_interval__gri__raw * 1 if group_repetition_interval__gri__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('group_repetition_interval__gri_', 'Group Repetition Interval (GRI)', "", '', group_repetition_interval__gri_, group_repetition_interval__gri__raw))

    # master_range | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    master_range_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    if master_range_raw is not None and master_range_raw & (1 << (32 - 1)):
        master_range_raw -= (1 << 32)
    master_range = master_range_raw * 1 if master_range_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('master_range', 'Master Range', "", '', master_range, master_range_raw))

    # v_secondary_range | Offset: 64, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    v_secondary_range_raw = decode_number((data_raw >> 64) & 0xFFFFFFFF, 32)
    if v_secondary_range_raw is not None and v_secondary_range_raw & (1 << (32 - 1)):
        v_secondary_range_raw -= (1 << 32)
    v_secondary_range = v_secondary_range_raw * 1 if v_secondary_range_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('v_secondary_range', 'V Secondary Range', "", '', v_secondary_range, v_secondary_range_raw))

    # w_secondary_range | Offset: 96, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    w_secondary_range_raw = decode_number((data_raw >> 96) & 0xFFFFFFFF, 32)
    if w_secondary_range_raw is not None and w_secondary_range_raw & (1 << (32 - 1)):
        w_secondary_range_raw -= (1 << 32)
    w_secondary_range = w_secondary_range_raw * 1 if w_secondary_range_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('w_secondary_range', 'W Secondary Range', "", '', w_secondary_range, w_secondary_range_raw))

    # x_secondary_range | Offset: 128, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    x_secondary_range_raw = decode_number((data_raw >> 128) & 0xFFFFFFFF, 32)
    if x_secondary_range_raw is not None and x_secondary_range_raw & (1 << (32 - 1)):
        x_secondary_range_raw -= (1 << 32)
    x_secondary_range = x_secondary_range_raw * 1 if x_secondary_range_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('x_secondary_range', 'X Secondary Range', "", '', x_secondary_range, x_secondary_range_raw))

    # y_secondary_range | Offset: 160, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    y_secondary_range_raw = decode_number((data_raw >> 160) & 0xFFFFFFFF, 32)
    if y_secondary_range_raw is not None and y_secondary_range_raw & (1 << (32 - 1)):
        y_secondary_range_raw -= (1 << 32)
    y_secondary_range = y_secondary_range_raw * 1 if y_secondary_range_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('y_secondary_range', 'Y Secondary Range', "", '', y_secondary_range, y_secondary_range_raw))

    # z_secondary_range | Offset: 192, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    z_secondary_range_raw = decode_number((data_raw >> 192) & 0xFFFFFFFF, 32)
    if z_secondary_range_raw is not None and z_secondary_range_raw & (1 << (32 - 1)):
        z_secondary_range_raw -= (1 << 32)
    z_secondary_range = z_secondary_range_raw * 1 if z_secondary_range_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('z_secondary_range', 'Z Secondary Range', "", '', z_secondary_range, z_secondary_range_raw))

    # station_status__master | Offset: 224, Length: 4, Resolution: 1, Field Type: BITLOOKUP, Match: 
    station_status__master_raw = (data_raw >> 224) & 0xF
    station_status__master = station_status__master_raw * 1 if station_status__master_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_status__master', 'Station status: Master', "", '', station_status__master, station_status__master_raw))

    # station_status__v | Offset: 228, Length: 4, Resolution: 1, Field Type: BITLOOKUP, Match: 
    station_status__v_raw = (data_raw >> 228) & 0xF
    station_status__v = station_status__v_raw * 1 if station_status__v_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_status__v', 'Station status: V', "", '', station_status__v, station_status__v_raw))

    # station_status__w | Offset: 232, Length: 4, Resolution: 1, Field Type: BITLOOKUP, Match: 
    station_status__w_raw = (data_raw >> 232) & 0xF
    station_status__w = station_status__w_raw * 1 if station_status__w_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_status__w', 'Station status: W', "", '', station_status__w, station_status__w_raw))

    # station_status__x | Offset: 236, Length: 4, Resolution: 1, Field Type: BITLOOKUP, Match: 
    station_status__x_raw = (data_raw >> 236) & 0xF
    station_status__x = station_status__x_raw * 1 if station_status__x_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_status__x', 'Station status: X', "", '', station_status__x, station_status__x_raw))

    # station_status__y | Offset: 240, Length: 4, Resolution: 1, Field Type: BITLOOKUP, Match: 
    station_status__y_raw = (data_raw >> 240) & 0xF
    station_status__y = station_status__y_raw * 1 if station_status__y_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_status__y', 'Station status: Y', "", '', station_status__y, station_status__y_raw))

    # station_status__z | Offset: 244, Length: 4, Resolution: 1, Field Type: BITLOOKUP, Match: 
    station_status__z_raw = (data_raw >> 244) & 0xF
    station_status__z = station_status__z_raw * 1 if station_status__z_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_status__z', 'Station status: Z', "", '', station_status__z, station_status__z_raw))

    # mode | Offset: 248, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    mode_raw = (data_raw >> 248) & 0xF
    mode = lookup_RESIDUAL_MODE(mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "", '', mode, mode_raw))

    # reserved_252 | Offset: 252, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_252_raw = (data_raw >> 252) & 0xF
    reserved_252 = reserved_252_raw * 1 if reserved_252_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_252', 'Reserved', "", '', reserved_252, reserved_252_raw))

    return nmea2000Message

def encode_pgn_130053(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130053."""
    data_raw = 0
    # group_repetition_interval__gri_ | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'group_repetition_interval__gri_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group Repetition Interval (GRI)'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # master_range | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'master_range'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Master Range'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    # v_secondary_range | Offset: 64, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'v_secondary_range'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'V Secondary Range'")
    data_raw |= (field_value & 0xFFFFFFFF) << 64
    # w_secondary_range | Offset: 96, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'w_secondary_range'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'W Secondary Range'")
    data_raw |= (field_value & 0xFFFFFFFF) << 96
    # x_secondary_range | Offset: 128, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'x_secondary_range'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'X Secondary Range'")
    data_raw |= (field_value & 0xFFFFFFFF) << 128
    # y_secondary_range | Offset: 160, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'y_secondary_range'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Y Secondary Range'")
    data_raw |= (field_value & 0xFFFFFFFF) << 160
    # z_secondary_range | Offset: 192, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'z_secondary_range'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Z Secondary Range'")
    data_raw |= (field_value & 0xFFFFFFFF) << 192
    # station_status__master | Offset: 224, Length: 4, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_status__master'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station status: Master'")
    data_raw |= (field_value & 0xF) << 224
    # station_status__v | Offset: 228, Length: 4, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_status__v'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station status: V'")
    data_raw |= (field_value & 0xF) << 228
    # station_status__w | Offset: 232, Length: 4, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_status__w'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station status: W'")
    data_raw |= (field_value & 0xF) << 232
    # station_status__x | Offset: 236, Length: 4, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_status__x'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station status: X'")
    data_raw |= (field_value & 0xF) << 236
    # station_status__y | Offset: 240, Length: 4, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_status__y'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station status: Y'")
    data_raw |= (field_value & 0xF) << 240
    # station_status__z | Offset: 244, Length: 4, Resolution: 1, Field Type: BITLOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_status__z'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station status: Z'")
    data_raw |= (field_value & 0xF) << 244
    # mode | Offset: 248, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RESIDUAL_MODE(f.value) for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xF) << 248
    # reserved_252 | Offset: 252, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_252'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 252
    return data_raw


def is_fast_pgn_130054() -> bool:
    """Return True if PGN 130054 is a fast PGN."""
    return True
def decode_pgn_130054(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130054."""
    nmea2000Message = NMEA2000Message(130054, 'loranCSignalData', 'Loran-C Signal Data')
    # group_repetition_interval__gri_ | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    group_repetition_interval__gri__raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    if group_repetition_interval__gri__raw is not None and group_repetition_interval__gri__raw & (1 << (32 - 1)):
        group_repetition_interval__gri__raw -= (1 << 32)
    group_repetition_interval__gri_ = group_repetition_interval__gri__raw * 1 if group_repetition_interval__gri__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('group_repetition_interval__gri_', 'Group Repetition Interval (GRI)', "", '', group_repetition_interval__gri_, group_repetition_interval__gri__raw))

    # station_identifier | Offset: 32, Length: 8, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # station_snr | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    station_snr_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    if station_snr_raw is not None and station_snr_raw & (1 << (16 - 1)):
        station_snr_raw -= (1 << 16)
    station_snr = station_snr_raw * 0.01 if station_snr_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_snr', 'Station SNR', "", 'dB', station_snr, station_snr_raw))

    # station_ecd | Offset: 56, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    station_ecd_raw = decode_number((data_raw >> 56) & 0xFFFFFFFF, 32)
    if station_ecd_raw is not None and station_ecd_raw & (1 << (32 - 1)):
        station_ecd_raw -= (1 << 32)
    station_ecd = station_ecd_raw * 1 if station_ecd_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_ecd', 'Station ECD', "", '', station_ecd, station_ecd_raw))

    # station_asf | Offset: 88, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    station_asf_raw = decode_number((data_raw >> 88) & 0xFFFFFFFF, 32)
    if station_asf_raw is not None and station_asf_raw & (1 << (32 - 1)):
        station_asf_raw -= (1 << 32)
    station_asf = station_asf_raw * 1 if station_asf_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_asf', 'Station ASF', "", '', station_asf, station_asf_raw))

    return nmea2000Message

def encode_pgn_130054(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130054."""
    data_raw = 0
    # group_repetition_interval__gri_ | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'group_repetition_interval__gri_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group Repetition Interval (GRI)'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # station_identifier | Offset: 32, Length: 8, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station identifier'")
    data_raw |= (field_value & 0xFF) << 32
    # station_snr | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_snr'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station SNR'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 40
    
    # station_ecd | Offset: 56, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_ecd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station ECD'")
    data_raw |= (field_value & 0xFFFFFFFF) << 56
    # station_asf | Offset: 88, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_asf'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station ASF'")
    data_raw |= (field_value & 0xFFFFFFFF) << 88
    return data_raw


def is_fast_pgn_130060() -> bool:
    """Return True if PGN 130060 is a fast PGN."""
    return True
def decode_pgn_130060(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130060."""
    nmea2000Message = NMEA2000Message(130060, 'label', 'Label')
    # hardware_channel_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    hardware_channel_id_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    hardware_channel_id = hardware_channel_id_raw * 1 if hardware_channel_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('hardware_channel_id', 'Hardware Channel ID', "", '', hardware_channel_id, hardware_channel_id_raw))

    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 8) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "", '', pgn, pgn_raw))

    # data_source_instance_field_number | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_instance_field_number_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    data_source_instance_field_number = data_source_instance_field_number_raw * 1 if data_source_instance_field_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_instance_field_number', 'Data Source Instance Field Number', "", '', data_source_instance_field_number, data_source_instance_field_number_raw))

    # data_source_instance_value | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_instance_value_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    data_source_instance_value = data_source_instance_value_raw * 1 if data_source_instance_value_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_instance_value', 'Data Source Instance Value', "", '', data_source_instance_value, data_source_instance_value_raw))

    # secondary_enumeration_field_number | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    secondary_enumeration_field_number_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    secondary_enumeration_field_number = secondary_enumeration_field_number_raw * 1 if secondary_enumeration_field_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('secondary_enumeration_field_number', 'Secondary Enumeration Field Number', "", '', secondary_enumeration_field_number, secondary_enumeration_field_number_raw))

    # secondary_enumeration_field_value | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    secondary_enumeration_field_value_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    secondary_enumeration_field_value = secondary_enumeration_field_value_raw * 1 if secondary_enumeration_field_value_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('secondary_enumeration_field_value', 'Secondary Enumeration Field Value', "", '', secondary_enumeration_field_value, secondary_enumeration_field_value_raw))

    # parameter_field_number | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    parameter_field_number_raw = decode_number((data_raw >> 64) & 0xFF, 8)
    parameter_field_number = parameter_field_number_raw * 1 if parameter_field_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('parameter_field_number', 'Parameter Field Number', "", '', parameter_field_number, parameter_field_number_raw))


    return nmea2000Message

def encode_pgn_130060(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130060."""
    data_raw = 0
    # hardware_channel_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'hardware_channel_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Hardware Channel ID'")
    data_raw |= (field_value & 0xFF) << 0
    # pgn | Offset: 8, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 8
    # data_source_instance_field_number | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_instance_field_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Instance Field Number'")
    data_raw |= (field_value & 0xFF) << 32
    # data_source_instance_value | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_instance_value'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Instance Value'")
    data_raw |= (field_value & 0xFF) << 40
    # secondary_enumeration_field_number | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'secondary_enumeration_field_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Secondary Enumeration Field Number'")
    data_raw |= (field_value & 0xFF) << 48
    # secondary_enumeration_field_value | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'secondary_enumeration_field_value'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Secondary Enumeration Field Value'")
    data_raw |= (field_value & 0xFF) << 56
    # parameter_field_number | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'parameter_field_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Parameter Field Number'")
    data_raw |= (field_value & 0xFF) << 64
    raise Exception ("PGN 130060 not supporting encoding for now as Label is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130061() -> bool:
    """Return True if PGN 130061 is a fast PGN."""
    return True
def decode_pgn_130061(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130061."""
    nmea2000Message = NMEA2000Message(130061, 'channelSourceConfiguration', 'Channel Source Configuration')
    # data_source_channel_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_channel_id_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    data_source_channel_id = data_source_channel_id_raw * 1 if data_source_channel_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_channel_id', 'Data Source Channel ID', "", '', data_source_channel_id, data_source_channel_id_raw))

    # source_selection_status | Offset: 8, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    source_selection_status_raw = decode_number((data_raw >> 8) & 0x3, 2)
    source_selection_status = source_selection_status_raw * 1 if source_selection_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_selection_status', 'Source Selection Status', "", '', source_selection_status, source_selection_status_raw))

    # reserved_10 | Offset: 10, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_10_raw = (data_raw >> 10) & 0x3
    reserved_10 = reserved_10_raw * 1 if reserved_10_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_10', 'Reserved', "", '', reserved_10, reserved_10_raw))

    # name_selection_criteria_mask | Offset: 12, Length: 12, Resolution: 1, Field Type: BINARY, Match: 
    name_selection_criteria_mask_raw = (data_raw >> 12) & 0xFFF
    name_selection_criteria_mask = name_selection_criteria_mask_raw * 1 if name_selection_criteria_mask_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('name_selection_criteria_mask', 'NAME Selection Criteria Mask', "", '', name_selection_criteria_mask, name_selection_criteria_mask_raw))

    # source_name | Offset: 24, Length: 64, Resolution: 1, Field Type: NUMBER, Match: 
    source_name_raw = decode_number((data_raw >> 24) & 0xFFFFFFFFFFFFFFFF, 64)
    source_name = source_name_raw * 1 if source_name_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_name', 'Source NAME', "", '', source_name, source_name_raw))

    # pgn | Offset: 88, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    pgn_raw = decode_number((data_raw >> 88) & 0xFFFFFF, 24)
    pgn = pgn_raw * 1 if pgn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pgn', 'PGN', "", '', pgn, pgn_raw))

    # data_source_instance_field_number | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_instance_field_number_raw = decode_number((data_raw >> 112) & 0xFF, 8)
    data_source_instance_field_number = data_source_instance_field_number_raw * 1 if data_source_instance_field_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_instance_field_number', 'Data Source Instance Field Number', "", '', data_source_instance_field_number, data_source_instance_field_number_raw))

    # data_source_instance_value | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    data_source_instance_value_raw = decode_number((data_raw >> 120) & 0xFF, 8)
    data_source_instance_value = data_source_instance_value_raw * 1 if data_source_instance_value_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_source_instance_value', 'Data Source Instance Value', "", '', data_source_instance_value, data_source_instance_value_raw))

    # secondary_enumeration_field_number | Offset: 128, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    secondary_enumeration_field_number_raw = decode_number((data_raw >> 128) & 0xFF, 8)
    secondary_enumeration_field_number = secondary_enumeration_field_number_raw * 1 if secondary_enumeration_field_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('secondary_enumeration_field_number', 'Secondary Enumeration Field Number', "", '', secondary_enumeration_field_number, secondary_enumeration_field_number_raw))

    # secondary_enumeration_field_value | Offset: 136, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    secondary_enumeration_field_value_raw = decode_number((data_raw >> 136) & 0xFF, 8)
    secondary_enumeration_field_value = secondary_enumeration_field_value_raw * 1 if secondary_enumeration_field_value_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('secondary_enumeration_field_value', 'Secondary Enumeration Field Value', "", '', secondary_enumeration_field_value, secondary_enumeration_field_value_raw))

    # parameter_field_number | Offset: 144, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    parameter_field_number_raw = decode_number((data_raw >> 144) & 0xFF, 8)
    parameter_field_number = parameter_field_number_raw * 1 if parameter_field_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('parameter_field_number', 'Parameter Field Number', "", '', parameter_field_number, parameter_field_number_raw))

    return nmea2000Message

def encode_pgn_130061(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130061."""
    data_raw = 0
    # data_source_channel_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_channel_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Channel ID'")
    data_raw |= (field_value & 0xFF) << 0
    # source_selection_status | Offset: 8, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_selection_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source Selection Status'")
    data_raw |= (field_value & 0x3) << 8
    # reserved_10 | Offset: 10, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_10'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 10
    # name_selection_criteria_mask | Offset: 12, Length: 12, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'name_selection_criteria_mask'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'NAME Selection Criteria Mask'")
    data_raw |= (field_value & 0xFFF) << 12
    # source_name | Offset: 24, Length: 64, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_name'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source NAME'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFF) << 24
    # pgn | Offset: 88, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pgn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'PGN'")
    data_raw |= (field_value & 0xFFFFFF) << 88
    # data_source_instance_field_number | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_instance_field_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Instance Field Number'")
    data_raw |= (field_value & 0xFF) << 112
    # data_source_instance_value | Offset: 120, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_source_instance_value'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Source Instance Value'")
    data_raw |= (field_value & 0xFF) << 120
    # secondary_enumeration_field_number | Offset: 128, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'secondary_enumeration_field_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Secondary Enumeration Field Number'")
    data_raw |= (field_value & 0xFF) << 128
    # secondary_enumeration_field_value | Offset: 136, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'secondary_enumeration_field_value'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Secondary Enumeration Field Value'")
    data_raw |= (field_value & 0xFF) << 136
    # parameter_field_number | Offset: 144, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'parameter_field_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Parameter Field Number'")
    data_raw |= (field_value & 0xFF) << 144
    return data_raw


def is_fast_pgn_130064() -> bool:
    """Return True if PGN 130064 is a fast PGN."""
    return True
def decode_pgn_130064(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130064."""
    nmea2000Message = NMEA2000Message(130064, 'routeAndWpServiceDatabaseList', 'Route and WP Service - Database List')
    # start_database_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    start_database_id_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    start_database_id = start_database_id_raw * 1 if start_database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('start_database_id', 'Start Database ID', "", '', start_database_id, start_database_id_raw))

    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    nitems_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    nitems = nitems_raw * 1 if nitems_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('nitems', 'nItems', "", '', nitems, nitems_raw))

    # number_of_databases_available | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_databases_available_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    number_of_databases_available = number_of_databases_available_raw * 1 if number_of_databases_available_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_databases_available', 'Number of Databases Available', "", '', number_of_databases_available, number_of_databases_available_raw))

    # database_id | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    database_id_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    database_id = database_id_raw * 1 if database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('database_id', 'Database ID', "", '', database_id, database_id_raw))









    return nmea2000Message

def encode_pgn_130064(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130064."""
    data_raw = 0
    # start_database_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start Database ID'")
    data_raw |= (field_value & 0xFF) << 0
    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'nitems'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'nItems'")
    data_raw |= (field_value & 0xFF) << 8
    # number_of_databases_available | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_databases_available'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Databases Available'")
    data_raw |= (field_value & 0xFF) << 16
    # database_id | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Database ID'")
    data_raw |= (field_value & 0xFF) << 24
    raise Exception ("PGN 130064 not supporting encoding for now as Database Name is missing BitLength or BitOffset")
    raise Exception ("PGN 130064 not supporting encoding for now as Database Timestamp is missing BitLength or BitOffset")
    raise Exception ("PGN 130064 not supporting encoding for now as Database Datestamp is missing BitLength or BitOffset")
    raise Exception ("PGN 130064 not supporting encoding for now as WP Position Resolution is missing BitLength or BitOffset")
    raise Exception ("PGN 130064 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    raise Exception ("PGN 130064 not supporting encoding for now as Number of Routes in Database is missing BitLength or BitOffset")
    raise Exception ("PGN 130064 not supporting encoding for now as Number of WPs in Database is missing BitLength or BitOffset")
    raise Exception ("PGN 130064 not supporting encoding for now as Number of Bytes in Database is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130065() -> bool:
    """Return True if PGN 130065 is a fast PGN."""
    return True
def decode_pgn_130065(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130065."""
    nmea2000Message = NMEA2000Message(130065, 'routeAndWpServiceRouteList', 'Route and WP Service - Route List')
    # start_route_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    start_route_id_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    start_route_id = start_route_id_raw * 1 if start_route_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('start_route_id', 'Start Route ID', "", '', start_route_id, start_route_id_raw))

    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    nitems_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    nitems = nitems_raw * 1 if nitems_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('nitems', 'nItems', "", '', nitems, nitems_raw))

    # number_of_routes_in_database | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_routes_in_database_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    number_of_routes_in_database = number_of_routes_in_database_raw * 1 if number_of_routes_in_database_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_routes_in_database', 'Number of Routes in Database', "", '', number_of_routes_in_database, number_of_routes_in_database_raw))

    # database_id | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    database_id_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    database_id = database_id_raw * 1 if database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('database_id', 'Database ID', "", '', database_id, database_id_raw))

    # route_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    route_id_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    route_id = route_id_raw * 1 if route_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('route_id', 'Route ID', "", '', route_id, route_id_raw))





    return nmea2000Message

def encode_pgn_130065(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130065."""
    data_raw = 0
    # start_route_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_route_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start Route ID'")
    data_raw |= (field_value & 0xFF) << 0
    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'nitems'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'nItems'")
    data_raw |= (field_value & 0xFF) << 8
    # number_of_routes_in_database | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_routes_in_database'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Routes in Database'")
    data_raw |= (field_value & 0xFF) << 16
    # database_id | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Database ID'")
    data_raw |= (field_value & 0xFF) << 24
    # route_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'route_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Route ID'")
    data_raw |= (field_value & 0xFF) << 32
    raise Exception ("PGN 130065 not supporting encoding for now as Route Name is missing BitLength or BitOffset")
    raise Exception ("PGN 130065 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    raise Exception ("PGN 130065 not supporting encoding for now as WP Identification Method is missing BitLength or BitOffset")
    raise Exception ("PGN 130065 not supporting encoding for now as Route Status is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130066() -> bool:
    """Return True if PGN 130066 is a fast PGN."""
    return True
def decode_pgn_130066(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130066."""
    nmea2000Message = NMEA2000Message(130066, 'routeAndWpServiceRouteWpListAttributes', 'Route and WP Service - Route/WP-List Attributes')
    # database_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    database_id_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    database_id = database_id_raw * 1 if database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('database_id', 'Database ID', "", '', database_id, database_id_raw))

    # route_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    route_id_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    route_id = route_id_raw * 1 if route_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('route_id', 'Route ID', "", '', route_id, route_id_raw))












    return nmea2000Message

def encode_pgn_130066(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130066."""
    data_raw = 0
    # database_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Database ID'")
    data_raw |= (field_value & 0xFF) << 0
    # route_id | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'route_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Route ID'")
    data_raw |= (field_value & 0xFF) << 8
    raise Exception ("PGN 130066 not supporting encoding for now as Route/WP-List Name is missing BitLength or BitOffset")
    raise Exception ("PGN 130066 not supporting encoding for now as Route/WP-List Timestamp is missing BitLength or BitOffset")
    raise Exception ("PGN 130066 not supporting encoding for now as Route/WP-List Datestamp is missing BitLength or BitOffset")
    raise Exception ("PGN 130066 not supporting encoding for now as Change at Last Timestamp is missing BitLength or BitOffset")
    raise Exception ("PGN 130066 not supporting encoding for now as Number of WPs in the Route/WP-List is missing BitLength or BitOffset")
    raise Exception ("PGN 130066 not supporting encoding for now as Critical supplementary parameters is missing BitLength or BitOffset")
    raise Exception ("PGN 130066 not supporting encoding for now as Navigation Method is missing BitLength or BitOffset")
    raise Exception ("PGN 130066 not supporting encoding for now as WP Identification Method is missing BitLength or BitOffset")
    raise Exception ("PGN 130066 not supporting encoding for now as Route Status is missing BitLength or BitOffset")
    raise Exception ("PGN 130066 not supporting encoding for now as XTE Limit for the Route is missing BitLength or BitOffset")
    raise Exception ("PGN 130066 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130067() -> bool:
    """Return True if PGN 130067 is a fast PGN."""
    return True
def decode_pgn_130067(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130067."""
    nmea2000Message = NMEA2000Message(130067, 'routeAndWpServiceRouteWpNamePosition', 'Route and WP Service - Route - WP Name & Position')
    # start_rps_ | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    start_rps__raw = decode_number((data_raw >> 0) & 0xFF, 8)
    start_rps_ = start_rps__raw * 1 if start_rps__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('start_rps_', 'Start RPS#', "", '', start_rps_, start_rps__raw))

    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    nitems_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    nitems = nitems_raw * 1 if nitems_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('nitems', 'nItems', "", '', nitems, nitems_raw))

    # number_of_wps_in_the_route_wp_list | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_wps_in_the_route_wp_list_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    number_of_wps_in_the_route_wp_list = number_of_wps_in_the_route_wp_list_raw * 1 if number_of_wps_in_the_route_wp_list_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_wps_in_the_route_wp_list', 'Number of WPs in the Route/WP-List', "", '', number_of_wps_in_the_route_wp_list, number_of_wps_in_the_route_wp_list_raw))

    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    database_id_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    database_id = database_id_raw * 1 if database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('database_id', 'Database ID', "", '', database_id, database_id_raw))

    # route_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    route_id_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    route_id = route_id_raw * 1 if route_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('route_id', 'Route ID', "", '', route_id, route_id_raw))

    # wp_id | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    wp_id_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    wp_id = wp_id_raw * 1 if wp_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wp_id', 'WP ID', "", '', wp_id, wp_id_raw))




    return nmea2000Message

def encode_pgn_130067(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130067."""
    data_raw = 0
    # start_rps_ | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_rps_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start RPS#'")
    data_raw |= (field_value & 0xFF) << 0
    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'nitems'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'nItems'")
    data_raw |= (field_value & 0xFF) << 8
    # number_of_wps_in_the_route_wp_list | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_wps_in_the_route_wp_list'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of WPs in the Route/WP-List'")
    data_raw |= (field_value & 0xFFFF) << 16
    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Database ID'")
    data_raw |= (field_value & 0xFF) << 32
    # route_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'route_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Route ID'")
    data_raw |= (field_value & 0xFF) << 40
    # wp_id | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wp_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'WP ID'")
    data_raw |= (field_value & 0xFF) << 48
    raise Exception ("PGN 130067 not supporting encoding for now as WP Name is missing BitLength or BitOffset")
    raise Exception ("PGN 130067 not supporting encoding for now as WP Latitude is missing BitLength or BitOffset")
    raise Exception ("PGN 130067 not supporting encoding for now as WP Longitude is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130068() -> bool:
    """Return True if PGN 130068 is a fast PGN."""
    return True
def decode_pgn_130068(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130068."""
    nmea2000Message = NMEA2000Message(130068, 'routeAndWpServiceRouteWpName', 'Route and WP Service - Route - WP Name')
    # start_rps_ | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    start_rps__raw = decode_number((data_raw >> 0) & 0xFF, 8)
    start_rps_ = start_rps__raw * 1 if start_rps__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('start_rps_', 'Start RPS#', "", '', start_rps_, start_rps__raw))

    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    nitems_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    nitems = nitems_raw * 1 if nitems_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('nitems', 'nItems', "", '', nitems, nitems_raw))

    # number_of_wps_in_the_route_wp_list | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_wps_in_the_route_wp_list_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    number_of_wps_in_the_route_wp_list = number_of_wps_in_the_route_wp_list_raw * 1 if number_of_wps_in_the_route_wp_list_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_wps_in_the_route_wp_list', 'Number of WPs in the Route/WP-List', "", '', number_of_wps_in_the_route_wp_list, number_of_wps_in_the_route_wp_list_raw))

    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    database_id_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    database_id = database_id_raw * 1 if database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('database_id', 'Database ID', "", '', database_id, database_id_raw))

    # route_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    route_id_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    route_id = route_id_raw * 1 if route_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('route_id', 'Route ID', "", '', route_id, route_id_raw))

    # wp_id | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    wp_id_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    wp_id = wp_id_raw * 1 if wp_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wp_id', 'WP ID', "", '', wp_id, wp_id_raw))


    return nmea2000Message

def encode_pgn_130068(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130068."""
    data_raw = 0
    # start_rps_ | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_rps_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start RPS#'")
    data_raw |= (field_value & 0xFF) << 0
    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'nitems'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'nItems'")
    data_raw |= (field_value & 0xFF) << 8
    # number_of_wps_in_the_route_wp_list | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_wps_in_the_route_wp_list'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of WPs in the Route/WP-List'")
    data_raw |= (field_value & 0xFFFF) << 16
    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Database ID'")
    data_raw |= (field_value & 0xFF) << 32
    # route_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'route_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Route ID'")
    data_raw |= (field_value & 0xFF) << 40
    # wp_id | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wp_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'WP ID'")
    data_raw |= (field_value & 0xFF) << 48
    raise Exception ("PGN 130068 not supporting encoding for now as WP Name is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130069() -> bool:
    """Return True if PGN 130069 is a fast PGN."""
    return True
def decode_pgn_130069(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130069."""
    nmea2000Message = NMEA2000Message(130069, 'routeAndWpServiceXteLimitNavigationMethod', 'Route and WP Service - XTE Limit & Navigation Method')
    # start_rps_ | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    start_rps__raw = decode_number((data_raw >> 0) & 0xFF, 8)
    start_rps_ = start_rps__raw * 1 if start_rps__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('start_rps_', 'Start RPS#', "", '', start_rps_, start_rps__raw))

    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    nitems_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    nitems = nitems_raw * 1 if nitems_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('nitems', 'nItems', "", '', nitems, nitems_raw))

    # number_of_wps_with_a_specific_xte_limit_or_nav__method | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_wps_with_a_specific_xte_limit_or_nav__method_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    number_of_wps_with_a_specific_xte_limit_or_nav__method = number_of_wps_with_a_specific_xte_limit_or_nav__method_raw * 1 if number_of_wps_with_a_specific_xte_limit_or_nav__method_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_wps_with_a_specific_xte_limit_or_nav__method', 'Number of WPs with a specific XTE Limit or Nav. Method', "", '', number_of_wps_with_a_specific_xte_limit_or_nav__method, number_of_wps_with_a_specific_xte_limit_or_nav__method_raw))

    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    database_id_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    database_id = database_id_raw * 1 if database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('database_id', 'Database ID', "", '', database_id, database_id_raw))

    # route_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    route_id_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    route_id = route_id_raw * 1 if route_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('route_id', 'Route ID', "", '', route_id, route_id_raw))

    # rps_ | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    rps__raw = decode_number((data_raw >> 48) & 0xFF, 8)
    rps_ = rps__raw * 1 if rps__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rps_', 'RPS#', "", '', rps_, rps__raw))

    # xte_limit_in_the_leg_after_wp | Offset: 56, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    xte_limit_in_the_leg_after_wp_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    xte_limit_in_the_leg_after_wp = xte_limit_in_the_leg_after_wp_raw * 1 if xte_limit_in_the_leg_after_wp_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('xte_limit_in_the_leg_after_wp', 'XTE limit in the leg after WP', "", '', xte_limit_in_the_leg_after_wp, xte_limit_in_the_leg_after_wp_raw))

    # nav__method_in_the_leg_after_wp | Offset: 72, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    nav__method_in_the_leg_after_wp_raw = decode_number((data_raw >> 72) & 0xF, 4)
    nav__method_in_the_leg_after_wp = nav__method_in_the_leg_after_wp_raw * 1 if nav__method_in_the_leg_after_wp_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('nav__method_in_the_leg_after_wp', 'Nav. Method in the leg after WP', "", '', nav__method_in_the_leg_after_wp, nav__method_in_the_leg_after_wp_raw))

    # reserved_76 | Offset: 76, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_76_raw = (data_raw >> 76) & 0xF
    reserved_76 = reserved_76_raw * 1 if reserved_76_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_76', 'Reserved', "", '', reserved_76, reserved_76_raw))

    return nmea2000Message

def encode_pgn_130069(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130069."""
    data_raw = 0
    # start_rps_ | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_rps_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start RPS#'")
    data_raw |= (field_value & 0xFF) << 0
    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'nitems'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'nItems'")
    data_raw |= (field_value & 0xFF) << 8
    # number_of_wps_with_a_specific_xte_limit_or_nav__method | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_wps_with_a_specific_xte_limit_or_nav__method'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of WPs with a specific XTE Limit or Nav. Method'")
    data_raw |= (field_value & 0xFFFF) << 16
    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Database ID'")
    data_raw |= (field_value & 0xFF) << 32
    # route_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'route_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Route ID'")
    data_raw |= (field_value & 0xFF) << 40
    # rps_ | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rps_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'RPS#'")
    data_raw |= (field_value & 0xFF) << 48
    # xte_limit_in_the_leg_after_wp | Offset: 56, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'xte_limit_in_the_leg_after_wp'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'XTE limit in the leg after WP'")
    data_raw |= (field_value & 0xFFFF) << 56
    # nav__method_in_the_leg_after_wp | Offset: 72, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'nav__method_in_the_leg_after_wp'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Nav. Method in the leg after WP'")
    data_raw |= (field_value & 0xF) << 72
    # reserved_76 | Offset: 76, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_76'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 76
    return data_raw


def is_fast_pgn_130070() -> bool:
    """Return True if PGN 130070 is a fast PGN."""
    return True
def decode_pgn_130070(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130070."""
    nmea2000Message = NMEA2000Message(130070, 'routeAndWpServiceWpComment', 'Route and WP Service - WP Comment')
    # start_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    start_id_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    start_id = start_id_raw * 1 if start_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('start_id', 'Start ID', "", '', start_id, start_id_raw))

    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    nitems_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    nitems = nitems_raw * 1 if nitems_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('nitems', 'nItems', "", '', nitems, nitems_raw))

    # number_of_wps_with_comments | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_wps_with_comments_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    number_of_wps_with_comments = number_of_wps_with_comments_raw * 1 if number_of_wps_with_comments_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_wps_with_comments', 'Number of WPs with Comments', "", '', number_of_wps_with_comments, number_of_wps_with_comments_raw))

    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    database_id_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    database_id = database_id_raw * 1 if database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('database_id', 'Database ID', "", '', database_id, database_id_raw))

    # route_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    route_id_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    route_id = route_id_raw * 1 if route_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('route_id', 'Route ID', "", '', route_id, route_id_raw))

    # wp_id___rps_ | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    wp_id___rps__raw = decode_number((data_raw >> 48) & 0xFF, 8)
    wp_id___rps_ = wp_id___rps__raw * 1 if wp_id___rps__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wp_id___rps_', 'WP ID / RPS#', "", '', wp_id___rps_, wp_id___rps__raw))


    return nmea2000Message

def encode_pgn_130070(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130070."""
    data_raw = 0
    # start_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start ID'")
    data_raw |= (field_value & 0xFF) << 0
    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'nitems'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'nItems'")
    data_raw |= (field_value & 0xFF) << 8
    # number_of_wps_with_comments | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_wps_with_comments'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of WPs with Comments'")
    data_raw |= (field_value & 0xFFFF) << 16
    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Database ID'")
    data_raw |= (field_value & 0xFF) << 32
    # route_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'route_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Route ID'")
    data_raw |= (field_value & 0xFF) << 40
    # wp_id___rps_ | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wp_id___rps_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'WP ID / RPS#'")
    data_raw |= (field_value & 0xFF) << 48
    raise Exception ("PGN 130070 not supporting encoding for now as Comment is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130071() -> bool:
    """Return True if PGN 130071 is a fast PGN."""
    return True
def decode_pgn_130071(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130071."""
    nmea2000Message = NMEA2000Message(130071, 'routeAndWpServiceRouteComment', 'Route and WP Service - Route Comment')
    # start_route_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    start_route_id_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    start_route_id = start_route_id_raw * 1 if start_route_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('start_route_id', 'Start Route ID', "", '', start_route_id, start_route_id_raw))

    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    nitems_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    nitems = nitems_raw * 1 if nitems_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('nitems', 'nItems', "", '', nitems, nitems_raw))

    # number_of_routes_with_comments | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_routes_with_comments_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    number_of_routes_with_comments = number_of_routes_with_comments_raw * 1 if number_of_routes_with_comments_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_routes_with_comments', 'Number of Routes with Comments', "", '', number_of_routes_with_comments, number_of_routes_with_comments_raw))

    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    database_id_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    database_id = database_id_raw * 1 if database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('database_id', 'Database ID', "", '', database_id, database_id_raw))

    # route_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    route_id_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    route_id = route_id_raw * 1 if route_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('route_id', 'Route ID', "", '', route_id, route_id_raw))


    return nmea2000Message

def encode_pgn_130071(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130071."""
    data_raw = 0
    # start_route_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_route_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start Route ID'")
    data_raw |= (field_value & 0xFF) << 0
    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'nitems'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'nItems'")
    data_raw |= (field_value & 0xFF) << 8
    # number_of_routes_with_comments | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_routes_with_comments'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Routes with Comments'")
    data_raw |= (field_value & 0xFFFF) << 16
    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Database ID'")
    data_raw |= (field_value & 0xFF) << 32
    # route_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'route_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Route ID'")
    data_raw |= (field_value & 0xFF) << 40
    raise Exception ("PGN 130071 not supporting encoding for now as Comment is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130072() -> bool:
    """Return True if PGN 130072 is a fast PGN."""
    return True
def decode_pgn_130072(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130072."""
    nmea2000Message = NMEA2000Message(130072, 'routeAndWpServiceDatabaseComment', 'Route and WP Service - Database Comment')
    # start_database_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    start_database_id_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    start_database_id = start_database_id_raw * 1 if start_database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('start_database_id', 'Start Database ID', "", '', start_database_id, start_database_id_raw))

    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    nitems_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    nitems = nitems_raw * 1 if nitems_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('nitems', 'nItems', "", '', nitems, nitems_raw))

    # number_of_databases_with_comments | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_databases_with_comments_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    number_of_databases_with_comments = number_of_databases_with_comments_raw * 1 if number_of_databases_with_comments_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_databases_with_comments', 'Number of Databases with Comments', "", '', number_of_databases_with_comments, number_of_databases_with_comments_raw))

    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    database_id_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    database_id = database_id_raw * 1 if database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('database_id', 'Database ID', "", '', database_id, database_id_raw))


    return nmea2000Message

def encode_pgn_130072(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130072."""
    data_raw = 0
    # start_database_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start Database ID'")
    data_raw |= (field_value & 0xFF) << 0
    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'nitems'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'nItems'")
    data_raw |= (field_value & 0xFF) << 8
    # number_of_databases_with_comments | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_databases_with_comments'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Databases with Comments'")
    data_raw |= (field_value & 0xFFFF) << 16
    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Database ID'")
    data_raw |= (field_value & 0xFF) << 32
    raise Exception ("PGN 130072 not supporting encoding for now as Comment is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130073() -> bool:
    """Return True if PGN 130073 is a fast PGN."""
    return True
def decode_pgn_130073(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130073."""
    nmea2000Message = NMEA2000Message(130073, 'routeAndWpServiceRadiusOfTurn', 'Route and WP Service - Radius of Turn')
    # start_rps_ | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    start_rps__raw = decode_number((data_raw >> 0) & 0xFF, 8)
    start_rps_ = start_rps__raw * 1 if start_rps__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('start_rps_', 'Start RPS#', "", '', start_rps_, start_rps__raw))

    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    nitems_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    nitems = nitems_raw * 1 if nitems_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('nitems', 'nItems', "", '', nitems, nitems_raw))

    # number_of_wps_with_a_specific_radius_of_turn | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_wps_with_a_specific_radius_of_turn_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    number_of_wps_with_a_specific_radius_of_turn = number_of_wps_with_a_specific_radius_of_turn_raw * 1 if number_of_wps_with_a_specific_radius_of_turn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_wps_with_a_specific_radius_of_turn', 'Number of WPs with a specific Radius of Turn', "", '', number_of_wps_with_a_specific_radius_of_turn, number_of_wps_with_a_specific_radius_of_turn_raw))

    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    database_id_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    database_id = database_id_raw * 1 if database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('database_id', 'Database ID', "", '', database_id, database_id_raw))

    # route_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    route_id_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    route_id = route_id_raw * 1 if route_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('route_id', 'Route ID', "", '', route_id, route_id_raw))

    # rps_ | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    rps__raw = decode_number((data_raw >> 48) & 0xFF, 8)
    rps_ = rps__raw * 1 if rps__raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('rps_', 'RPS#', "", '', rps_, rps__raw))

    # radius_of_turn | Offset: 56, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    radius_of_turn_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    radius_of_turn = radius_of_turn_raw * 1 if radius_of_turn_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('radius_of_turn', 'Radius of Turn', "", '', radius_of_turn, radius_of_turn_raw))

    return nmea2000Message

def encode_pgn_130073(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130073."""
    data_raw = 0
    # start_rps_ | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_rps_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start RPS#'")
    data_raw |= (field_value & 0xFF) << 0
    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'nitems'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'nItems'")
    data_raw |= (field_value & 0xFF) << 8
    # number_of_wps_with_a_specific_radius_of_turn | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_wps_with_a_specific_radius_of_turn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of WPs with a specific Radius of Turn'")
    data_raw |= (field_value & 0xFFFF) << 16
    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Database ID'")
    data_raw |= (field_value & 0xFF) << 32
    # route_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'route_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Route ID'")
    data_raw |= (field_value & 0xFF) << 40
    # rps_ | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'rps_'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'RPS#'")
    data_raw |= (field_value & 0xFF) << 48
    # radius_of_turn | Offset: 56, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'radius_of_turn'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Radius of Turn'")
    data_raw |= (field_value & 0xFFFF) << 56
    return data_raw


def is_fast_pgn_130074() -> bool:
    """Return True if PGN 130074 is a fast PGN."""
    return True
def decode_pgn_130074(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130074."""
    nmea2000Message = NMEA2000Message(130074, 'routeAndWpServiceWpListWpNamePosition', 'Route and WP Service - WP List - WP Name & Position')
    # start_wp_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    start_wp_id_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    start_wp_id = start_wp_id_raw * 1 if start_wp_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('start_wp_id', 'Start WP ID', "", '', start_wp_id, start_wp_id_raw))

    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    nitems_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    nitems = nitems_raw * 1 if nitems_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('nitems', 'nItems', "", '', nitems, nitems_raw))

    # number_of_valid_wps_in_the_wp_list | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_valid_wps_in_the_wp_list_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    number_of_valid_wps_in_the_wp_list = number_of_valid_wps_in_the_wp_list_raw * 1 if number_of_valid_wps_in_the_wp_list_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_valid_wps_in_the_wp_list', 'Number of valid WPs in the WP-List', "", '', number_of_valid_wps_in_the_wp_list, number_of_valid_wps_in_the_wp_list_raw))

    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    database_id_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    database_id = database_id_raw * 1 if database_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('database_id', 'Database ID', "", '', database_id, database_id_raw))

    # reserved_40 | Offset: 40, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0xFF
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    # wp_id | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    wp_id_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    wp_id = wp_id_raw * 1 if wp_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wp_id', 'WP ID', "", '', wp_id, wp_id_raw))




    return nmea2000Message

def encode_pgn_130074(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130074."""
    data_raw = 0
    # start_wp_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_wp_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start WP ID'")
    data_raw |= (field_value & 0xFF) << 0
    # nitems | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'nitems'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'nItems'")
    data_raw |= (field_value & 0xFF) << 8
    # number_of_valid_wps_in_the_wp_list | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_valid_wps_in_the_wp_list'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of valid WPs in the WP-List'")
    data_raw |= (field_value & 0xFFFF) << 16
    # database_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'database_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Database ID'")
    data_raw |= (field_value & 0xFF) << 32
    # reserved_40 | Offset: 40, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 40
    # wp_id | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wp_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'WP ID'")
    data_raw |= (field_value & 0xFF) << 48
    raise Exception ("PGN 130074 not supporting encoding for now as WP Name is missing BitLength or BitOffset")
    raise Exception ("PGN 130074 not supporting encoding for now as WP Latitude is missing BitLength or BitOffset")
    raise Exception ("PGN 130074 not supporting encoding for now as WP Longitude is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130306() -> bool:
    """Return True if PGN 130306 is a fast PGN."""
    return False
def decode_pgn_130306(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130306."""
    nmea2000Message = NMEA2000Message(130306, 'windData', 'Wind Data')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # wind_speed | Offset: 8, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    wind_speed_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    wind_speed = wind_speed_raw * 0.01 if wind_speed_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wind_speed', 'Wind Speed', "", 'm/s', wind_speed, wind_speed_raw))

    # wind_angle | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    wind_angle_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    wind_angle = wind_angle_raw * 0.0001 if wind_angle_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wind_angle', 'Wind Angle', "", 'rad', wind_angle, wind_angle_raw))

    # reference | Offset: 40, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    reference_raw = (data_raw >> 40) & 0x7
    reference = lookup_WIND_REFERENCE(reference_raw)
    nmea2000Message.fields.append(NMEA2000Field('reference', 'Reference', "", '', reference, reference_raw))

    # reserved_43 | Offset: 43, Length: 21, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_43_raw = (data_raw >> 43) & 0x1FFFFF
    reserved_43 = reserved_43_raw * 1 if reserved_43_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_43', 'Reserved', "", '', reserved_43, reserved_43_raw))

    return nmea2000Message

def encode_pgn_130306(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130306."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # wind_speed | Offset: 8, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wind_speed'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wind Speed'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 8
    
    # wind_angle | Offset: 24, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wind_angle'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wind Angle'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 24
    
    # reference | Offset: 40, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_WIND_REFERENCE(f.value) for f in nmea2000Message.fields if f.id == 'reference'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reference'")
    data_raw |= (field_value & 0x7) << 40
    # reserved_43 | Offset: 43, Length: 21, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_43'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1FFFFF) << 43
    return data_raw


def is_fast_pgn_130310() -> bool:
    """Return True if PGN 130310 is a fast PGN."""
    return False
def decode_pgn_130310(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130310."""
    nmea2000Message = NMEA2000Message(130310, 'environmentalParametersObsolete', 'Environmental Parameters (obsolete)')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # water_temperature | Offset: 8, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    water_temperature_raw = decode_number((data_raw >> 8) & 0xFFFF, 16)
    water_temperature = water_temperature_raw * 0.01 if water_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('water_temperature', 'Water Temperature', "", 'K', water_temperature, water_temperature_raw))

    # outside_ambient_air_temperature | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    outside_ambient_air_temperature_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    outside_ambient_air_temperature = outside_ambient_air_temperature_raw * 0.01 if outside_ambient_air_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('outside_ambient_air_temperature', 'Outside Ambient Air Temperature', "", 'K', outside_ambient_air_temperature, outside_ambient_air_temperature_raw))

    # atmospheric_pressure | Offset: 40, Length: 16, Resolution: 100, Field Type: NUMBER, Match: 
    atmospheric_pressure_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    atmospheric_pressure = atmospheric_pressure_raw * 100 if atmospheric_pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('atmospheric_pressure', 'Atmospheric Pressure', "", 'Pa', atmospheric_pressure, atmospheric_pressure_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_130310(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130310."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # water_temperature | Offset: 8, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'water_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Water Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 8
    
    # outside_ambient_air_temperature | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'outside_ambient_air_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Outside Ambient Air Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 24
    
    # atmospheric_pressure | Offset: 40, Length: 16, Resolution: 100, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'atmospheric_pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Atmospheric Pressure'")        
    data_raw |= (int(field_value / 100) & 0xFFFF) << 40
    
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_130311() -> bool:
    """Return True if PGN 130311 is a fast PGN."""
    return False
def decode_pgn_130311(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130311."""
    nmea2000Message = NMEA2000Message(130311, 'environmentalParameters', 'Environmental Parameters')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # temperature_source | Offset: 8, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    temperature_source_raw = (data_raw >> 8) & 0x3F
    temperature_source = lookup_TEMPERATURE_SOURCE(temperature_source_raw)
    nmea2000Message.fields.append(NMEA2000Field('temperature_source', 'Temperature Source', "", '', temperature_source, temperature_source_raw))

    # humidity_source | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    humidity_source_raw = (data_raw >> 14) & 0x3
    humidity_source = lookup_HUMIDITY_SOURCE(humidity_source_raw)
    nmea2000Message.fields.append(NMEA2000Field('humidity_source', 'Humidity Source', "", '', humidity_source, humidity_source_raw))

    # temperature | Offset: 16, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    temperature_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    temperature = temperature_raw * 0.01 if temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('temperature', 'Temperature', "", 'K', temperature, temperature_raw))

    # humidity | Offset: 32, Length: 16, Resolution: 0.004, Field Type: NUMBER, Match: 
    humidity_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    if humidity_raw is not None and humidity_raw & (1 << (16 - 1)):
        humidity_raw -= (1 << 16)
    humidity = humidity_raw * 0.004 if humidity_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('humidity', 'Humidity', "", '%', humidity, humidity_raw))

    # atmospheric_pressure | Offset: 48, Length: 16, Resolution: 100, Field Type: NUMBER, Match: 
    atmospheric_pressure_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    atmospheric_pressure = atmospheric_pressure_raw * 100 if atmospheric_pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('atmospheric_pressure', 'Atmospheric Pressure', "", 'Pa', atmospheric_pressure, atmospheric_pressure_raw))

    return nmea2000Message

def encode_pgn_130311(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130311."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # temperature_source | Offset: 8, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TEMPERATURE_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'temperature_source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temperature Source'")
    data_raw |= (field_value & 0x3F) << 8
    # humidity_source | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_HUMIDITY_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'humidity_source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Humidity Source'")
    data_raw |= (field_value & 0x3) << 14
    # temperature | Offset: 16, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 16
    
    # humidity | Offset: 32, Length: 16, Resolution: 0.004, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'humidity'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Humidity'")        
    data_raw |= (int(field_value / 0.004) & 0xFFFF) << 32
    
    # atmospheric_pressure | Offset: 48, Length: 16, Resolution: 100, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'atmospheric_pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Atmospheric Pressure'")        
    data_raw |= (int(field_value / 100) & 0xFFFF) << 48
    
    return data_raw


def is_fast_pgn_130312() -> bool:
    """Return True if PGN 130312 is a fast PGN."""
    return False
def decode_pgn_130312(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130312."""
    nmea2000Message = NMEA2000Message(130312, 'temperature', 'Temperature')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # source | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 16) & 0xFF
    source = lookup_TEMPERATURE_SOURCE(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    # actual_temperature | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    actual_temperature_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    actual_temperature = actual_temperature_raw * 0.01 if actual_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('actual_temperature', 'Actual Temperature', "", 'K', actual_temperature, actual_temperature_raw))

    # set_temperature | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    set_temperature_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    set_temperature = set_temperature_raw * 0.01 if set_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('set_temperature', 'Set Temperature', "", 'K', set_temperature, set_temperature_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_130312(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130312."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 8
    # source | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TEMPERATURE_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xFF) << 16
    # actual_temperature | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'actual_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Actual Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 24
    
    # set_temperature | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'set_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Set Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 40
    
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_130313() -> bool:
    """Return True if PGN 130313 is a fast PGN."""
    return False
def decode_pgn_130313(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130313."""
    nmea2000Message = NMEA2000Message(130313, 'humidity', 'Humidity')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # source | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 16) & 0xFF
    source = lookup_HUMIDITY_SOURCE(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    # actual_humidity | Offset: 24, Length: 16, Resolution: 0.004, Field Type: NUMBER, Match: 
    actual_humidity_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    if actual_humidity_raw is not None and actual_humidity_raw & (1 << (16 - 1)):
        actual_humidity_raw -= (1 << 16)
    actual_humidity = actual_humidity_raw * 0.004 if actual_humidity_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('actual_humidity', 'Actual Humidity', "", '%', actual_humidity, actual_humidity_raw))

    # set_humidity | Offset: 40, Length: 16, Resolution: 0.004, Field Type: NUMBER, Match: 
    set_humidity_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    if set_humidity_raw is not None and set_humidity_raw & (1 << (16 - 1)):
        set_humidity_raw -= (1 << 16)
    set_humidity = set_humidity_raw * 0.004 if set_humidity_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('set_humidity', 'Set Humidity', "", '%', set_humidity, set_humidity_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_130313(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130313."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 8
    # source | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_HUMIDITY_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xFF) << 16
    # actual_humidity | Offset: 24, Length: 16, Resolution: 0.004, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'actual_humidity'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Actual Humidity'")        
    data_raw |= (int(field_value / 0.004) & 0xFFFF) << 24
    
    # set_humidity | Offset: 40, Length: 16, Resolution: 0.004, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'set_humidity'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Set Humidity'")        
    data_raw |= (int(field_value / 0.004) & 0xFFFF) << 40
    
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_130314() -> bool:
    """Return True if PGN 130314 is a fast PGN."""
    return False
def decode_pgn_130314(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130314."""
    nmea2000Message = NMEA2000Message(130314, 'actualPressure', 'Actual Pressure')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # source | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 16) & 0xFF
    source = lookup_PRESSURE_SOURCE(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    # pressure | Offset: 24, Length: 32, Resolution: 0.1, Field Type: NUMBER, Match: 
    pressure_raw = decode_number((data_raw >> 24) & 0xFFFFFFFF, 32)
    if pressure_raw is not None and pressure_raw & (1 << (32 - 1)):
        pressure_raw -= (1 << 32)
    pressure = pressure_raw * 0.1 if pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pressure', 'Pressure', "", 'Pa', pressure, pressure_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_130314(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130314."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 8
    # source | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_PRESSURE_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xFF) << 16
    # pressure | Offset: 24, Length: 32, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Pressure'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFFFFFF) << 24
    
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_130315() -> bool:
    """Return True if PGN 130315 is a fast PGN."""
    return False
def decode_pgn_130315(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130315."""
    nmea2000Message = NMEA2000Message(130315, 'setPressure', 'Set Pressure')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # source | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 16) & 0xFF
    source = lookup_PRESSURE_SOURCE(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    # pressure | Offset: 24, Length: 32, Resolution: 0.1, Field Type: NUMBER, Match: 
    pressure_raw = decode_number((data_raw >> 24) & 0xFFFFFFFF, 32)
    pressure = pressure_raw * 0.1 if pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pressure', 'Pressure', "", 'Pa', pressure, pressure_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_130315(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130315."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 8
    # source | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_PRESSURE_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xFF) << 16
    # pressure | Offset: 24, Length: 32, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Pressure'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFFFFFF) << 24
    
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_130316() -> bool:
    """Return True if PGN 130316 is a fast PGN."""
    return False
def decode_pgn_130316(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130316."""
    nmea2000Message = NMEA2000Message(130316, 'temperatureExtendedRange', 'Temperature Extended Range')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # source | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 16) & 0xFF
    source = lookup_TEMPERATURE_SOURCE(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    # temperature | Offset: 24, Length: 24, Resolution: 0.001, Field Type: NUMBER, Match: 
    temperature_raw = decode_number((data_raw >> 24) & 0xFFFFFF, 24)
    temperature = temperature_raw * 0.001 if temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('temperature', 'Temperature', "", 'K', temperature, temperature_raw))

    # set_temperature | Offset: 48, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    set_temperature_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    set_temperature = set_temperature_raw * 0.1 if set_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('set_temperature', 'Set Temperature', "", 'K', set_temperature, set_temperature_raw))

    return nmea2000Message

def encode_pgn_130316(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130316."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # instance | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 8
    # source | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TEMPERATURE_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xFF) << 16
    # temperature | Offset: 24, Length: 24, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Temperature'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFF) << 24
    
    # set_temperature | Offset: 48, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'set_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Set Temperature'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 48
    
    return data_raw


def is_fast_pgn_130320() -> bool:
    """Return True if PGN 130320 is a fast PGN."""
    return True
def decode_pgn_130320(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130320."""
    nmea2000Message = NMEA2000Message(130320, 'tideStationData', 'Tide Station Data')
    # mode | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    mode_raw = (data_raw >> 0) & 0xF
    mode = lookup_RESIDUAL_MODE(mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "", '', mode, mode_raw))

    # tide_tendency | Offset: 4, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    tide_tendency_raw = (data_raw >> 4) & 0x3
    tide_tendency = lookup_TIDE(tide_tendency_raw)
    nmea2000Message.fields.append(NMEA2000Field('tide_tendency', 'Tide Tendency', "", '', tide_tendency, tide_tendency_raw))

    # reserved_6 | Offset: 6, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_6_raw = (data_raw >> 6) & 0x3
    reserved_6 = reserved_6_raw * 1 if reserved_6_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_6', 'Reserved', "", '', reserved_6, reserved_6_raw))

    # measurement_date | Offset: 8, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    measurement_date_raw = (data_raw >> 8) & 0xFFFF
    measurement_date = decode_date(measurement_date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('measurement_date', 'Measurement Date', "", 'd', measurement_date, measurement_date_raw))

    # measurement_time | Offset: 24, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    measurement_time_raw = (data_raw >> 24) & 0xFFFFFFFF
    measurement_time = decode_time(measurement_time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('measurement_time', 'Measurement Time', "Seconds since midnight", 's', measurement_time, measurement_time_raw))

    # station_latitude | Offset: 56, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    station_latitude_raw = decode_number((data_raw >> 56) & 0xFFFFFFFF, 32)
    if station_latitude_raw is not None and station_latitude_raw & (1 << (32 - 1)):
        station_latitude_raw -= (1 << 32)
    station_latitude = station_latitude_raw * 1e-07 if station_latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_latitude', 'Station Latitude', "", 'deg', station_latitude, station_latitude_raw))

    # station_longitude | Offset: 88, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    station_longitude_raw = decode_number((data_raw >> 88) & 0xFFFFFFFF, 32)
    if station_longitude_raw is not None and station_longitude_raw & (1 << (32 - 1)):
        station_longitude_raw -= (1 << 32)
    station_longitude = station_longitude_raw * 1e-07 if station_longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_longitude', 'Station Longitude', "", 'deg', station_longitude, station_longitude_raw))

    # tide_level | Offset: 120, Length: 16, Resolution: 0.001, Field Type: NUMBER, Match: 
    tide_level_raw = decode_number((data_raw >> 120) & 0xFFFF, 16)
    if tide_level_raw is not None and tide_level_raw & (1 << (16 - 1)):
        tide_level_raw -= (1 << 16)
    tide_level = tide_level_raw * 0.001 if tide_level_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('tide_level', 'Tide Level', "Relative to MLLW", 'm', tide_level, tide_level_raw))

    # tide_level_standard_deviation | Offset: 136, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    tide_level_standard_deviation_raw = decode_number((data_raw >> 136) & 0xFFFF, 16)
    tide_level_standard_deviation = tide_level_standard_deviation_raw * 0.01 if tide_level_standard_deviation_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('tide_level_standard_deviation', 'Tide Level standard deviation', "", 'm', tide_level_standard_deviation, tide_level_standard_deviation_raw))



    return nmea2000Message

def encode_pgn_130320(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130320."""
    data_raw = 0
    # mode | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RESIDUAL_MODE(f.value) for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xF) << 0
    # tide_tendency | Offset: 4, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TIDE(f.value) for f in nmea2000Message.fields if f.id == 'tide_tendency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Tide Tendency'")
    data_raw |= (field_value & 0x3) << 4
    # reserved_6 | Offset: 6, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_6'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 6
    # measurement_date | Offset: 8, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'measurement_date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Measurement Date'")
    data_raw |= (field_value & 0xFFFF) << 8
    # measurement_time | Offset: 24, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'measurement_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Measurement Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 24
    
    # station_latitude | Offset: 56, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 56
    
    # station_longitude | Offset: 88, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 88
    
    # tide_level | Offset: 120, Length: 16, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'tide_level'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Tide Level'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 120
    
    # tide_level_standard_deviation | Offset: 136, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'tide_level_standard_deviation'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Tide Level standard deviation'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 136
    
    raise Exception ("PGN 130320 not supporting encoding for now as Station ID is missing BitLength or BitOffset")
    raise Exception ("PGN 130320 not supporting encoding for now as Station Name is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130321() -> bool:
    """Return True if PGN 130321 is a fast PGN."""
    return True
def decode_pgn_130321(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130321."""
    nmea2000Message = NMEA2000Message(130321, 'salinityStationData', 'Salinity Station Data')
    # mode | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    mode_raw = (data_raw >> 0) & 0xF
    mode = lookup_RESIDUAL_MODE(mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "", '', mode, mode_raw))

    # reserved_4 | Offset: 4, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_4_raw = (data_raw >> 4) & 0xF
    reserved_4 = reserved_4_raw * 1 if reserved_4_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_4', 'Reserved', "", '', reserved_4, reserved_4_raw))

    # measurement_date | Offset: 8, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    measurement_date_raw = (data_raw >> 8) & 0xFFFF
    measurement_date = decode_date(measurement_date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('measurement_date', 'Measurement Date', "", 'd', measurement_date, measurement_date_raw))

    # measurement_time | Offset: 24, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    measurement_time_raw = (data_raw >> 24) & 0xFFFFFFFF
    measurement_time = decode_time(measurement_time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('measurement_time', 'Measurement Time', "Seconds since midnight", 's', measurement_time, measurement_time_raw))

    # station_latitude | Offset: 56, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    station_latitude_raw = decode_number((data_raw >> 56) & 0xFFFFFFFF, 32)
    if station_latitude_raw is not None and station_latitude_raw & (1 << (32 - 1)):
        station_latitude_raw -= (1 << 32)
    station_latitude = station_latitude_raw * 1e-07 if station_latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_latitude', 'Station Latitude', "", 'deg', station_latitude, station_latitude_raw))

    # station_longitude | Offset: 88, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    station_longitude_raw = decode_number((data_raw >> 88) & 0xFFFFFFFF, 32)
    if station_longitude_raw is not None and station_longitude_raw & (1 << (32 - 1)):
        station_longitude_raw -= (1 << 32)
    station_longitude = station_longitude_raw * 1e-07 if station_longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_longitude', 'Station Longitude', "", 'deg', station_longitude, station_longitude_raw))

    # salinity | Offset: 120, Length: 32, Resolution: 1, Field Type: FLOAT, Match: 
    salinity_raw = decode_float((data_raw >> 120) & 0xFFFFFFFF)
    if salinity_raw is not None and salinity_raw & (1 << (32 - 1)):
        salinity_raw -= (1 << 32)
    salinity = salinity_raw * 1 if salinity_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('salinity', 'Salinity', "", 'ppt', salinity, salinity_raw))

    # water_temperature | Offset: 152, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    water_temperature_raw = decode_number((data_raw >> 152) & 0xFFFF, 16)
    water_temperature = water_temperature_raw * 0.01 if water_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('water_temperature', 'Water Temperature', "", 'K', water_temperature, water_temperature_raw))



    return nmea2000Message

def encode_pgn_130321(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130321."""
    data_raw = 0
    # mode | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RESIDUAL_MODE(f.value) for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xF) << 0
    # reserved_4 | Offset: 4, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 4
    # measurement_date | Offset: 8, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'measurement_date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Measurement Date'")
    data_raw |= (field_value & 0xFFFF) << 8
    # measurement_time | Offset: 24, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'measurement_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Measurement Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 24
    
    # station_latitude | Offset: 56, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 56
    
    # station_longitude | Offset: 88, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 88
    
    # salinity | Offset: 120, Length: 32, Resolution: 1, Field Type: FLOAT
    field_value = next((encode_float(f.value) for f in nmea2000Message.fields if f.id == 'salinity'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Salinity'")
    data_raw |= (field_value & 0xFFFFFFFF) << 120
    # water_temperature | Offset: 152, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'water_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Water Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 152
    
    raise Exception ("PGN 130321 not supporting encoding for now as Station ID is missing BitLength or BitOffset")
    raise Exception ("PGN 130321 not supporting encoding for now as Station Name is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130322() -> bool:
    """Return True if PGN 130322 is a fast PGN."""
    return True
def decode_pgn_130322(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130322."""
    nmea2000Message = NMEA2000Message(130322, 'currentStationData', 'Current Station Data')
    # mode | Offset: 0, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    mode_raw = decode_number((data_raw >> 0) & 0xF, 4)
    mode = mode_raw * 1 if mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "", '', mode, mode_raw))

    # reserved_4 | Offset: 4, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_4_raw = (data_raw >> 4) & 0xF
    reserved_4 = reserved_4_raw * 1 if reserved_4_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_4', 'Reserved', "", '', reserved_4, reserved_4_raw))

    # measurement_date | Offset: 8, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    measurement_date_raw = (data_raw >> 8) & 0xFFFF
    measurement_date = decode_date(measurement_date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('measurement_date', 'Measurement Date', "", 'd', measurement_date, measurement_date_raw))

    # measurement_time | Offset: 24, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    measurement_time_raw = (data_raw >> 24) & 0xFFFFFFFF
    measurement_time = decode_time(measurement_time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('measurement_time', 'Measurement Time', "Seconds since midnight", 's', measurement_time, measurement_time_raw))

    # station_latitude | Offset: 56, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    station_latitude_raw = decode_number((data_raw >> 56) & 0xFFFFFFFF, 32)
    if station_latitude_raw is not None and station_latitude_raw & (1 << (32 - 1)):
        station_latitude_raw -= (1 << 32)
    station_latitude = station_latitude_raw * 1e-07 if station_latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_latitude', 'Station Latitude', "", 'deg', station_latitude, station_latitude_raw))

    # station_longitude | Offset: 88, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    station_longitude_raw = decode_number((data_raw >> 88) & 0xFFFFFFFF, 32)
    if station_longitude_raw is not None and station_longitude_raw & (1 << (32 - 1)):
        station_longitude_raw -= (1 << 32)
    station_longitude = station_longitude_raw * 1e-07 if station_longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_longitude', 'Station Longitude', "", 'deg', station_longitude, station_longitude_raw))

    # measurement_depth | Offset: 120, Length: 32, Resolution: 0.01, Field Type: NUMBER, Match: 
    measurement_depth_raw = decode_number((data_raw >> 120) & 0xFFFFFFFF, 32)
    measurement_depth = measurement_depth_raw * 0.01 if measurement_depth_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('measurement_depth', 'Measurement Depth', "Depth below transducer", 'm', measurement_depth, measurement_depth_raw))

    # current_speed | Offset: 152, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    current_speed_raw = decode_number((data_raw >> 152) & 0xFFFF, 16)
    current_speed = current_speed_raw * 0.01 if current_speed_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('current_speed', 'Current speed', "", 'm/s', current_speed, current_speed_raw))

    # current_flow_direction | Offset: 168, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    current_flow_direction_raw = decode_number((data_raw >> 168) & 0xFFFF, 16)
    current_flow_direction = current_flow_direction_raw * 0.0001 if current_flow_direction_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('current_flow_direction', 'Current flow direction', "", 'rad', current_flow_direction, current_flow_direction_raw))

    # water_temperature | Offset: 184, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    water_temperature_raw = decode_number((data_raw >> 184) & 0xFFFF, 16)
    water_temperature = water_temperature_raw * 0.01 if water_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('water_temperature', 'Water Temperature', "", 'K', water_temperature, water_temperature_raw))



    return nmea2000Message

def encode_pgn_130322(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130322."""
    data_raw = 0
    # mode | Offset: 0, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xF) << 0
    # reserved_4 | Offset: 4, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 4
    # measurement_date | Offset: 8, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'measurement_date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Measurement Date'")
    data_raw |= (field_value & 0xFFFF) << 8
    # measurement_time | Offset: 24, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'measurement_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Measurement Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 24
    
    # station_latitude | Offset: 56, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 56
    
    # station_longitude | Offset: 88, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 88
    
    # measurement_depth | Offset: 120, Length: 32, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'measurement_depth'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Measurement Depth'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFFFFFF) << 120
    
    # current_speed | Offset: 152, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'current_speed'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Current speed'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 152
    
    # current_flow_direction | Offset: 168, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'current_flow_direction'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Current flow direction'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 168
    
    # water_temperature | Offset: 184, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'water_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Water Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 184
    
    raise Exception ("PGN 130322 not supporting encoding for now as Station ID is missing BitLength or BitOffset")
    raise Exception ("PGN 130322 not supporting encoding for now as Station Name is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130323() -> bool:
    """Return True if PGN 130323 is a fast PGN."""
    return True
def decode_pgn_130323(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130323."""
    nmea2000Message = NMEA2000Message(130323, 'meteorologicalStationData', 'Meteorological Station Data')
    # mode | Offset: 0, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    mode_raw = decode_number((data_raw >> 0) & 0xF, 4)
    mode = mode_raw * 1 if mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "", '', mode, mode_raw))

    # reserved_4 | Offset: 4, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_4_raw = (data_raw >> 4) & 0xF
    reserved_4 = reserved_4_raw * 1 if reserved_4_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_4', 'Reserved', "", '', reserved_4, reserved_4_raw))

    # measurement_date | Offset: 8, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    measurement_date_raw = (data_raw >> 8) & 0xFFFF
    measurement_date = decode_date(measurement_date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('measurement_date', 'Measurement Date', "", 'd', measurement_date, measurement_date_raw))

    # measurement_time | Offset: 24, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    measurement_time_raw = (data_raw >> 24) & 0xFFFFFFFF
    measurement_time = decode_time(measurement_time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('measurement_time', 'Measurement Time', "Seconds since midnight", 's', measurement_time, measurement_time_raw))

    # station_latitude | Offset: 56, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    station_latitude_raw = decode_number((data_raw >> 56) & 0xFFFFFFFF, 32)
    if station_latitude_raw is not None and station_latitude_raw & (1 << (32 - 1)):
        station_latitude_raw -= (1 << 32)
    station_latitude = station_latitude_raw * 1e-07 if station_latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_latitude', 'Station Latitude', "", 'deg', station_latitude, station_latitude_raw))

    # station_longitude | Offset: 88, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    station_longitude_raw = decode_number((data_raw >> 88) & 0xFFFFFFFF, 32)
    if station_longitude_raw is not None and station_longitude_raw & (1 << (32 - 1)):
        station_longitude_raw -= (1 << 32)
    station_longitude = station_longitude_raw * 1e-07 if station_longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_longitude', 'Station Longitude', "", 'deg', station_longitude, station_longitude_raw))

    # wind_speed | Offset: 120, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    wind_speed_raw = decode_number((data_raw >> 120) & 0xFFFF, 16)
    wind_speed = wind_speed_raw * 0.01 if wind_speed_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wind_speed', 'Wind Speed', "", 'm/s', wind_speed, wind_speed_raw))

    # wind_direction | Offset: 136, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    wind_direction_raw = decode_number((data_raw >> 136) & 0xFFFF, 16)
    wind_direction = wind_direction_raw * 0.0001 if wind_direction_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wind_direction', 'Wind Direction', "", 'rad', wind_direction, wind_direction_raw))

    # wind_reference | Offset: 152, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    wind_reference_raw = (data_raw >> 152) & 0x7
    wind_reference = lookup_WIND_REFERENCE(wind_reference_raw)
    nmea2000Message.fields.append(NMEA2000Field('wind_reference', 'Wind Reference', "", '', wind_reference, wind_reference_raw))

    # reserved_155 | Offset: 155, Length: 5, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_155_raw = (data_raw >> 155) & 0x1F
    reserved_155 = reserved_155_raw * 1 if reserved_155_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_155', 'Reserved', "", '', reserved_155, reserved_155_raw))

    # wind_gusts | Offset: 160, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    wind_gusts_raw = decode_number((data_raw >> 160) & 0xFFFF, 16)
    wind_gusts = wind_gusts_raw * 0.01 if wind_gusts_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wind_gusts', 'Wind Gusts', "", 'm/s', wind_gusts, wind_gusts_raw))

    # atmospheric_pressure | Offset: 176, Length: 16, Resolution: 100, Field Type: NUMBER, Match: 
    atmospheric_pressure_raw = decode_number((data_raw >> 176) & 0xFFFF, 16)
    atmospheric_pressure = atmospheric_pressure_raw * 100 if atmospheric_pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('atmospheric_pressure', 'Atmospheric Pressure', "", 'Pa', atmospheric_pressure, atmospheric_pressure_raw))

    # ambient_temperature | Offset: 192, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    ambient_temperature_raw = decode_number((data_raw >> 192) & 0xFFFF, 16)
    ambient_temperature = ambient_temperature_raw * 0.01 if ambient_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('ambient_temperature', 'Ambient Temperature', "", 'K', ambient_temperature, ambient_temperature_raw))



    return nmea2000Message

def encode_pgn_130323(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130323."""
    data_raw = 0
    # mode | Offset: 0, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xF) << 0
    # reserved_4 | Offset: 4, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 4
    # measurement_date | Offset: 8, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'measurement_date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Measurement Date'")
    data_raw |= (field_value & 0xFFFF) << 8
    # measurement_time | Offset: 24, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'measurement_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Measurement Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 24
    
    # station_latitude | Offset: 56, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 56
    
    # station_longitude | Offset: 88, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 88
    
    # wind_speed | Offset: 120, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wind_speed'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wind Speed'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 120
    
    # wind_direction | Offset: 136, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wind_direction'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wind Direction'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 136
    
    # wind_reference | Offset: 152, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_WIND_REFERENCE(f.value) for f in nmea2000Message.fields if f.id == 'wind_reference'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wind Reference'")
    data_raw |= (field_value & 0x7) << 152
    # reserved_155 | Offset: 155, Length: 5, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_155'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1F) << 155
    # wind_gusts | Offset: 160, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wind_gusts'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wind Gusts'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 160
    
    # atmospheric_pressure | Offset: 176, Length: 16, Resolution: 100, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'atmospheric_pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Atmospheric Pressure'")        
    data_raw |= (int(field_value / 100) & 0xFFFF) << 176
    
    # ambient_temperature | Offset: 192, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'ambient_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Ambient Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 192
    
    raise Exception ("PGN 130323 not supporting encoding for now as Station ID is missing BitLength or BitOffset")
    raise Exception ("PGN 130323 not supporting encoding for now as Station Name is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130324() -> bool:
    """Return True if PGN 130324 is a fast PGN."""
    return True
def decode_pgn_130324(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130324."""
    nmea2000Message = NMEA2000Message(130324, 'mooredBuoyStationData', 'Moored Buoy Station Data')
    # mode | Offset: 0, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    mode_raw = decode_number((data_raw >> 0) & 0xF, 4)
    mode = mode_raw * 1 if mode_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "", '', mode, mode_raw))

    # reserved_4 | Offset: 4, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_4_raw = (data_raw >> 4) & 0xF
    reserved_4 = reserved_4_raw * 1 if reserved_4_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_4', 'Reserved', "", '', reserved_4, reserved_4_raw))

    # measurement_date | Offset: 8, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    measurement_date_raw = (data_raw >> 8) & 0xFFFF
    measurement_date = decode_date(measurement_date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('measurement_date', 'Measurement Date', "", 'd', measurement_date, measurement_date_raw))

    # measurement_time | Offset: 24, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    measurement_time_raw = (data_raw >> 24) & 0xFFFFFFFF
    measurement_time = decode_time(measurement_time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('measurement_time', 'Measurement Time', "Seconds since midnight", 's', measurement_time, measurement_time_raw))

    # station_latitude | Offset: 56, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    station_latitude_raw = decode_number((data_raw >> 56) & 0xFFFFFFFF, 32)
    if station_latitude_raw is not None and station_latitude_raw & (1 << (32 - 1)):
        station_latitude_raw -= (1 << 32)
    station_latitude = station_latitude_raw * 1e-07 if station_latitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_latitude', 'Station Latitude', "", 'deg', station_latitude, station_latitude_raw))

    # station_longitude | Offset: 88, Length: 32, Resolution: 1e-07, Field Type: NUMBER, Match: 
    station_longitude_raw = decode_number((data_raw >> 88) & 0xFFFFFFFF, 32)
    if station_longitude_raw is not None and station_longitude_raw & (1 << (32 - 1)):
        station_longitude_raw -= (1 << 32)
    station_longitude = station_longitude_raw * 1e-07 if station_longitude_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('station_longitude', 'Station Longitude', "", 'deg', station_longitude, station_longitude_raw))

    # wind_speed | Offset: 120, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    wind_speed_raw = decode_number((data_raw >> 120) & 0xFFFF, 16)
    wind_speed = wind_speed_raw * 0.01 if wind_speed_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wind_speed', 'Wind Speed', "", 'm/s', wind_speed, wind_speed_raw))

    # wind_direction | Offset: 136, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    wind_direction_raw = decode_number((data_raw >> 136) & 0xFFFF, 16)
    wind_direction = wind_direction_raw * 0.0001 if wind_direction_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wind_direction', 'Wind Direction', "", 'rad', wind_direction, wind_direction_raw))

    # wind_reference | Offset: 152, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    wind_reference_raw = (data_raw >> 152) & 0x7
    wind_reference = lookup_WIND_REFERENCE(wind_reference_raw)
    nmea2000Message.fields.append(NMEA2000Field('wind_reference', 'Wind Reference', "", '', wind_reference, wind_reference_raw))

    # reserved_155 | Offset: 155, Length: 5, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_155_raw = (data_raw >> 155) & 0x1F
    reserved_155 = reserved_155_raw * 1 if reserved_155_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_155', 'Reserved', "", '', reserved_155, reserved_155_raw))

    # wind_gusts | Offset: 160, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    wind_gusts_raw = decode_number((data_raw >> 160) & 0xFFFF, 16)
    wind_gusts = wind_gusts_raw * 0.01 if wind_gusts_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wind_gusts', 'Wind Gusts', "", 'm/s', wind_gusts, wind_gusts_raw))

    # wave_height | Offset: 176, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    wave_height_raw = decode_number((data_raw >> 176) & 0xFFFF, 16)
    wave_height = wave_height_raw * 1 if wave_height_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('wave_height', 'Wave Height', "", '', wave_height, wave_height_raw))

    # dominant_wave_period | Offset: 192, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    dominant_wave_period_raw = decode_number((data_raw >> 192) & 0xFFFF, 16)
    dominant_wave_period = dominant_wave_period_raw * 1 if dominant_wave_period_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dominant_wave_period', 'Dominant Wave Period', "", '', dominant_wave_period, dominant_wave_period_raw))

    # atmospheric_pressure | Offset: 208, Length: 16, Resolution: 100, Field Type: NUMBER, Match: 
    atmospheric_pressure_raw = decode_number((data_raw >> 208) & 0xFFFF, 16)
    atmospheric_pressure = atmospheric_pressure_raw * 100 if atmospheric_pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('atmospheric_pressure', 'Atmospheric Pressure', "", 'Pa', atmospheric_pressure, atmospheric_pressure_raw))

    # pressure_tendency_rate | Offset: 224, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    pressure_tendency_rate_raw = decode_number((data_raw >> 224) & 0xFFFF, 16)
    if pressure_tendency_rate_raw is not None and pressure_tendency_rate_raw & (1 << (16 - 1)):
        pressure_tendency_rate_raw -= (1 << 16)
    pressure_tendency_rate = pressure_tendency_rate_raw * 1 if pressure_tendency_rate_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pressure_tendency_rate', 'Pressure Tendency Rate', "", 'Pa/hr', pressure_tendency_rate, pressure_tendency_rate_raw))

    # air_temperature | Offset: 240, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    air_temperature_raw = decode_number((data_raw >> 240) & 0xFFFF, 16)
    air_temperature = air_temperature_raw * 0.01 if air_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('air_temperature', 'Air Temperature', "", 'K', air_temperature, air_temperature_raw))

    # water_temperature | Offset: 256, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    water_temperature_raw = decode_number((data_raw >> 256) & 0xFFFF, 16)
    water_temperature = water_temperature_raw * 0.01 if water_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('water_temperature', 'Water Temperature', "", 'K', water_temperature, water_temperature_raw))

    # station_id | Offset: 272, Length: 64, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130324(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130324."""
    data_raw = 0
    # mode | Offset: 0, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xF) << 0
    # reserved_4 | Offset: 4, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 4
    # measurement_date | Offset: 8, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'measurement_date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Measurement Date'")
    data_raw |= (field_value & 0xFFFF) << 8
    # measurement_time | Offset: 24, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'measurement_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Measurement Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 24
    
    # station_latitude | Offset: 56, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_latitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station Latitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 56
    
    # station_longitude | Offset: 88, Length: 32, Resolution: 1e-07, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'station_longitude'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station Longitude'")        
    data_raw |= (int(field_value / 1e-07) & 0xFFFFFFFF) << 88
    
    # wind_speed | Offset: 120, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wind_speed'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wind Speed'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 120
    
    # wind_direction | Offset: 136, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wind_direction'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wind Direction'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 136
    
    # wind_reference | Offset: 152, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_WIND_REFERENCE(f.value) for f in nmea2000Message.fields if f.id == 'wind_reference'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wind Reference'")
    data_raw |= (field_value & 0x7) << 152
    # reserved_155 | Offset: 155, Length: 5, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_155'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1F) << 155
    # wind_gusts | Offset: 160, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wind_gusts'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wind Gusts'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 160
    
    # wave_height | Offset: 176, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'wave_height'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Wave Height'")
    data_raw |= (field_value & 0xFFFF) << 176
    # dominant_wave_period | Offset: 192, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dominant_wave_period'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Dominant Wave Period'")
    data_raw |= (field_value & 0xFFFF) << 192
    # atmospheric_pressure | Offset: 208, Length: 16, Resolution: 100, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'atmospheric_pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Atmospheric Pressure'")        
    data_raw |= (int(field_value / 100) & 0xFFFF) << 208
    
    # pressure_tendency_rate | Offset: 224, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pressure_tendency_rate'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Pressure Tendency Rate'")
    data_raw |= (field_value & 0xFFFF) << 224
    # air_temperature | Offset: 240, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'air_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Air Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 240
    
    # water_temperature | Offset: 256, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'water_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Water Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 256
    
    # station_id | Offset: 272, Length: 64, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Station ID'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFF) << 272
    return data_raw


def is_fast_pgn_130330() -> bool:
    """Return True if PGN 130330 is a fast PGN."""
    return True
def decode_pgn_130330(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130330."""
    nmea2000Message = NMEA2000Message(130330, 'lightingSystemSettings', 'Lighting System Settings')
    # global_enable | Offset: 0, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    global_enable_raw = decode_number((data_raw >> 0) & 0x3, 2)
    global_enable = global_enable_raw * 1 if global_enable_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('global_enable', 'Global Enable', "", '', global_enable, global_enable_raw))

    # default_settings_command | Offset: 2, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 
    default_settings_command_raw = (data_raw >> 2) & 0x7
    default_settings_command = lookup_LIGHTING_COMMAND(default_settings_command_raw)
    nmea2000Message.fields.append(NMEA2000Field('default_settings_command', 'Default Settings/Command', "", '', default_settings_command, default_settings_command_raw))

    # reserved_5 | Offset: 5, Length: 3, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_5_raw = (data_raw >> 5) & 0x7
    reserved_5 = reserved_5_raw * 1 if reserved_5_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_5', 'Reserved', "", '', reserved_5, reserved_5_raw))










    return nmea2000Message

def encode_pgn_130330(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130330."""
    data_raw = 0
    # global_enable | Offset: 0, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'global_enable'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Global Enable'")
    data_raw |= (field_value & 0x3) << 0
    # default_settings_command | Offset: 2, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_LIGHTING_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'default_settings_command'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Default Settings/Command'")
    data_raw |= (field_value & 0x7) << 2
    # reserved_5 | Offset: 5, Length: 3, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_5'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7) << 5
    raise Exception ("PGN 130330 not supporting encoding for now as Name of the lighting controller is missing BitLength or BitOffset")
    raise Exception ("PGN 130330 not supporting encoding for now as Max Scenes is missing BitLength or BitOffset")
    raise Exception ("PGN 130330 not supporting encoding for now as Max Scene Configuration Count is missing BitLength or BitOffset")
    raise Exception ("PGN 130330 not supporting encoding for now as Max Zones is missing BitLength or BitOffset")
    raise Exception ("PGN 130330 not supporting encoding for now as Max Color Sequences is missing BitLength or BitOffset")
    raise Exception ("PGN 130330 not supporting encoding for now as Max Color Sequence Color Count is missing BitLength or BitOffset")
    raise Exception ("PGN 130330 not supporting encoding for now as Number of Programs is missing BitLength or BitOffset")
    raise Exception ("PGN 130330 not supporting encoding for now as Controller Capabilities is missing BitLength or BitOffset")
    raise Exception ("PGN 130330 not supporting encoding for now as Identify Device is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130560() -> bool:
    """Return True if PGN 130560 is a fast PGN."""
    return False
def decode_pgn_130560(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130560."""
    nmea2000Message = NMEA2000Message(130560, 'payloadMass', 'Payload Mass')
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # measurement_status | Offset: 8, Length: 3, Resolution: 1, Field Type: NUMBER, Match: 
    measurement_status_raw = decode_number((data_raw >> 8) & 0x7, 3)
    measurement_status = measurement_status_raw * 1 if measurement_status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('measurement_status', 'Measurement Status', "", '', measurement_status, measurement_status_raw))

    # reserved_11 | Offset: 11, Length: 5, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x1F
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # measurement_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    measurement_id_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    measurement_id = measurement_id_raw * 1 if measurement_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('measurement_id', 'Measurement ID', "", '', measurement_id, measurement_id_raw))

    # payload_mass | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    payload_mass_raw = decode_number((data_raw >> 24) & 0xFFFFFFFF, 32)
    payload_mass = payload_mass_raw * 1 if payload_mass_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('payload_mass', 'Payload Mass', "", '', payload_mass, payload_mass_raw))

    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_56_raw = (data_raw >> 56) & 0xFF
    reserved_56 = reserved_56_raw * 1 if reserved_56_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_56', 'Reserved', "", '', reserved_56, reserved_56_raw))

    return nmea2000Message

def encode_pgn_130560(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130560."""
    data_raw = 0
    # sid | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 0
    # measurement_status | Offset: 8, Length: 3, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'measurement_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Measurement Status'")
    data_raw |= (field_value & 0x7) << 8
    # reserved_11 | Offset: 11, Length: 5, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x1F) << 11
    # measurement_id | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'measurement_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Measurement ID'")
    data_raw |= (field_value & 0xFF) << 16
    # payload_mass | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'payload_mass'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Payload Mass'")
    data_raw |= (field_value & 0xFFFFFFFF) << 24
    # reserved_56 | Offset: 56, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_56'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw


def is_fast_pgn_130561() -> bool:
    """Return True if PGN 130561 is a fast PGN."""
    return True
def decode_pgn_130561(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130561."""
    nmea2000Message = NMEA2000Message(130561, 'lightingZone', 'Lighting Zone')
    # zone_index | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_index_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    zone_index = zone_index_raw * 1 if zone_index_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone_index', 'Zone Index', "", '', zone_index, zone_index_raw))














    return nmea2000Message

def encode_pgn_130561(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130561."""
    data_raw = 0
    # zone_index | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone_index'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone Index'")
    data_raw |= (field_value & 0xFF) << 0
    raise Exception ("PGN 130561 not supporting encoding for now as Zone Name is missing BitLength or BitOffset")
    raise Exception ("PGN 130561 not supporting encoding for now as Red Component is missing BitLength or BitOffset")
    raise Exception ("PGN 130561 not supporting encoding for now as Green Component is missing BitLength or BitOffset")
    raise Exception ("PGN 130561 not supporting encoding for now as Blue Component is missing BitLength or BitOffset")
    raise Exception ("PGN 130561 not supporting encoding for now as Color Temperature is missing BitLength or BitOffset")
    raise Exception ("PGN 130561 not supporting encoding for now as Intensity is missing BitLength or BitOffset")
    raise Exception ("PGN 130561 not supporting encoding for now as Program ID is missing BitLength or BitOffset")
    raise Exception ("PGN 130561 not supporting encoding for now as Program Color Sequence Index is missing BitLength or BitOffset")
    raise Exception ("PGN 130561 not supporting encoding for now as Program Intensity is missing BitLength or BitOffset")
    raise Exception ("PGN 130561 not supporting encoding for now as Program Rate is missing BitLength or BitOffset")
    raise Exception ("PGN 130561 not supporting encoding for now as Program Color Sequence is missing BitLength or BitOffset")
    raise Exception ("PGN 130561 not supporting encoding for now as Zone Enabled is missing BitLength or BitOffset")
    raise Exception ("PGN 130561 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130562() -> bool:
    """Return True if PGN 130562 is a fast PGN."""
    return True
def decode_pgn_130562(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130562."""
    nmea2000Message = NMEA2000Message(130562, 'lightingScene', 'Lighting Scene')
    # scene_index | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    scene_index_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    scene_index = scene_index_raw * 1 if scene_index_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('scene_index', 'Scene Index', "", '', scene_index, scene_index_raw))












    return nmea2000Message

def encode_pgn_130562(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130562."""
    data_raw = 0
    # scene_index | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'scene_index'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Scene Index'")
    data_raw |= (field_value & 0xFF) << 0
    raise Exception ("PGN 130562 not supporting encoding for now as Zone Name is missing BitLength or BitOffset")
    raise Exception ("PGN 130562 not supporting encoding for now as Control is missing BitLength or BitOffset")
    raise Exception ("PGN 130562 not supporting encoding for now as Configuration Count is missing BitLength or BitOffset")
    raise Exception ("PGN 130562 not supporting encoding for now as Configuration Index is missing BitLength or BitOffset")
    raise Exception ("PGN 130562 not supporting encoding for now as Zone Index is missing BitLength or BitOffset")
    raise Exception ("PGN 130562 not supporting encoding for now as Devices ID is missing BitLength or BitOffset")
    raise Exception ("PGN 130562 not supporting encoding for now as Program Index is missing BitLength or BitOffset")
    raise Exception ("PGN 130562 not supporting encoding for now as Program Color Sequence Index is missing BitLength or BitOffset")
    raise Exception ("PGN 130562 not supporting encoding for now as Program Intensity is missing BitLength or BitOffset")
    raise Exception ("PGN 130562 not supporting encoding for now as Program Rate is missing BitLength or BitOffset")
    raise Exception ("PGN 130562 not supporting encoding for now as Program Color Sequence Rate is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130563() -> bool:
    """Return True if PGN 130563 is a fast PGN."""
    return True
def decode_pgn_130563(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130563."""
    nmea2000Message = NMEA2000Message(130563, 'lightingDevice', 'Lighting Device')
    # device_id | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    device_id_raw = decode_number((data_raw >> 0) & 0xFFFFFFFF, 32)
    device_id = device_id_raw * 1 if device_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('device_id', 'Device ID', "", '', device_id, device_id_raw))

    # device_capabilities | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    device_capabilities_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    device_capabilities = device_capabilities_raw * 1 if device_capabilities_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('device_capabilities', 'Device Capabilities', "", '', device_capabilities, device_capabilities_raw))

    # color_capabilities | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    color_capabilities_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    color_capabilities = color_capabilities_raw * 1 if color_capabilities_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('color_capabilities', 'Color Capabilities', "", '', color_capabilities, color_capabilities_raw))

    # zone_index | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_index_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    zone_index = zone_index_raw * 1 if zone_index_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone_index', 'Zone Index', "", '', zone_index, zone_index_raw))















    return nmea2000Message

def encode_pgn_130563(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130563."""
    data_raw = 0
    # device_id | Offset: 0, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'device_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 0
    # device_capabilities | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'device_capabilities'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device Capabilities'")
    data_raw |= (field_value & 0xFF) << 32
    # color_capabilities | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'color_capabilities'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Color Capabilities'")
    data_raw |= (field_value & 0xFF) << 40
    # zone_index | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone_index'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone Index'")
    data_raw |= (field_value & 0xFF) << 48
    raise Exception ("PGN 130563 not supporting encoding for now as Name of Lighting Device is missing BitLength or BitOffset")
    raise Exception ("PGN 130563 not supporting encoding for now as Status is missing BitLength or BitOffset")
    raise Exception ("PGN 130563 not supporting encoding for now as Red Component is missing BitLength or BitOffset")
    raise Exception ("PGN 130563 not supporting encoding for now as Green Component is missing BitLength or BitOffset")
    raise Exception ("PGN 130563 not supporting encoding for now as Blue Component is missing BitLength or BitOffset")
    raise Exception ("PGN 130563 not supporting encoding for now as Color Temperature is missing BitLength or BitOffset")
    raise Exception ("PGN 130563 not supporting encoding for now as Intensity is missing BitLength or BitOffset")
    raise Exception ("PGN 130563 not supporting encoding for now as Program ID is missing BitLength or BitOffset")
    raise Exception ("PGN 130563 not supporting encoding for now as Program Color Sequence Index is missing BitLength or BitOffset")
    raise Exception ("PGN 130563 not supporting encoding for now as Program Intensity is missing BitLength or BitOffset")
    raise Exception ("PGN 130563 not supporting encoding for now as Program Rate is missing BitLength or BitOffset")
    raise Exception ("PGN 130563 not supporting encoding for now as Program Color Sequence Rate is missing BitLength or BitOffset")
    raise Exception ("PGN 130563 not supporting encoding for now as Enabled is missing BitLength or BitOffset")
    raise Exception ("PGN 130563 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130564() -> bool:
    """Return True if PGN 130564 is a fast PGN."""
    return True
def decode_pgn_130564(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130564."""
    nmea2000Message = NMEA2000Message(130564, 'lightingDeviceEnumeration', 'Lighting Device Enumeration')
    # index_of_first_device | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    index_of_first_device_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    index_of_first_device = index_of_first_device_raw * 1 if index_of_first_device_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('index_of_first_device', 'Index of First Device', "", '', index_of_first_device, index_of_first_device_raw))

    # total_number_of_devices | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    total_number_of_devices_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    total_number_of_devices = total_number_of_devices_raw * 1 if total_number_of_devices_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_number_of_devices', 'Total Number of Devices', "", '', total_number_of_devices, total_number_of_devices_raw))

    # number_of_devices | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_devices_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    number_of_devices = number_of_devices_raw * 1 if number_of_devices_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_devices', 'Number of Devices', "", '', number_of_devices, number_of_devices_raw))

    # device_id | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    device_id_raw = decode_number((data_raw >> 48) & 0xFFFFFFFF, 32)
    device_id = device_id_raw * 1 if device_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('device_id', 'Device ID', "", '', device_id, device_id_raw))

    # status | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    status_raw = decode_number((data_raw >> 80) & 0xFF, 8)
    status = status_raw * 1 if status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('status', 'Status', "", '', status, status_raw))

    return nmea2000Message

def encode_pgn_130564(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130564."""
    data_raw = 0
    # index_of_first_device | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'index_of_first_device'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Index of First Device'")
    data_raw |= (field_value & 0xFFFF) << 0
    # total_number_of_devices | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_number_of_devices'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total Number of Devices'")
    data_raw |= (field_value & 0xFFFF) << 16
    # number_of_devices | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_devices'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of Devices'")
    data_raw |= (field_value & 0xFFFF) << 32
    # device_id | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'device_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 48
    # status | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Status'")
    data_raw |= (field_value & 0xFF) << 80
    return data_raw


def is_fast_pgn_130565() -> bool:
    """Return True if PGN 130565 is a fast PGN."""
    return True
def decode_pgn_130565(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130565."""
    nmea2000Message = NMEA2000Message(130565, 'lightingColorSequence', 'Lighting Color Sequence')
    # sequence_index | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sequence_index_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    sequence_index = sequence_index_raw * 1 if sequence_index_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sequence_index', 'Sequence Index', "", '', sequence_index, sequence_index_raw))

    # color_count | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    color_count_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    color_count = color_count_raw * 1 if color_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('color_count', 'Color Count', "", '', color_count, color_count_raw))

    # color_index | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    color_index_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    color_index = color_index_raw * 1 if color_index_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('color_index', 'Color Index', "", '', color_index, color_index_raw))

    # red_component | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    red_component_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    red_component = red_component_raw * 1 if red_component_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('red_component', 'Red Component', "", '', red_component, red_component_raw))

    # green_component | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    green_component_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    green_component = green_component_raw * 1 if green_component_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('green_component', 'Green Component', "", '', green_component, green_component_raw))

    # blue_component | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    blue_component_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    blue_component = blue_component_raw * 1 if blue_component_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('blue_component', 'Blue Component', "", '', blue_component, blue_component_raw))

    # color_temperature | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    color_temperature_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    color_temperature = color_temperature_raw * 1 if color_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('color_temperature', 'Color Temperature', "", '', color_temperature, color_temperature_raw))

    # intensity | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    intensity_raw = decode_number((data_raw >> 64) & 0xFF, 8)
    intensity = intensity_raw * 1 if intensity_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('intensity', 'Intensity', "", '', intensity, intensity_raw))

    return nmea2000Message

def encode_pgn_130565(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130565."""
    data_raw = 0
    # sequence_index | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sequence_index'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sequence Index'")
    data_raw |= (field_value & 0xFF) << 0
    # color_count | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'color_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Color Count'")
    data_raw |= (field_value & 0xFF) << 8
    # color_index | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'color_index'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Color Index'")
    data_raw |= (field_value & 0xFF) << 16
    # red_component | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'red_component'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Red Component'")
    data_raw |= (field_value & 0xFF) << 24
    # green_component | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'green_component'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Green Component'")
    data_raw |= (field_value & 0xFF) << 32
    # blue_component | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'blue_component'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Blue Component'")
    data_raw |= (field_value & 0xFF) << 40
    # color_temperature | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'color_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Color Temperature'")
    data_raw |= (field_value & 0xFFFF) << 48
    # intensity | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'intensity'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Intensity'")
    data_raw |= (field_value & 0xFF) << 64
    return data_raw


def is_fast_pgn_130566() -> bool:
    """Return True if PGN 130566 is a fast PGN."""
    return True
def decode_pgn_130566(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130566."""
    nmea2000Message = NMEA2000Message(130566, 'lightingProgram', 'Lighting Program')
    # program_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    program_id_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    program_id = program_id_raw * 1 if program_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('program_id', 'Program ID', "", '', program_id, program_id_raw))





    return nmea2000Message

def encode_pgn_130566(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130566."""
    data_raw = 0
    # program_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'program_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Program ID'")
    data_raw |= (field_value & 0xFF) << 0
    raise Exception ("PGN 130566 not supporting encoding for now as Name of Program is missing BitLength or BitOffset")
    raise Exception ("PGN 130566 not supporting encoding for now as Description is missing BitLength or BitOffset")
    raise Exception ("PGN 130566 not supporting encoding for now as Program Capabilities is missing BitLength or BitOffset")
    raise Exception ("PGN 130566 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130567() -> bool:
    """Return True if PGN 130567 is a fast PGN."""
    return True
def decode_pgn_130567(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130567."""
    nmea2000Message = NMEA2000Message(130567, 'watermakerInputSettingAndStatus', 'Watermaker Input Setting and Status')
    # watermaker_operating_state | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP, Match: 
    watermaker_operating_state_raw = (data_raw >> 0) & 0x3F
    watermaker_operating_state = lookup_WATERMAKER_STATE(watermaker_operating_state_raw)
    nmea2000Message.fields.append(NMEA2000Field('watermaker_operating_state', 'Watermaker Operating State', "", '', watermaker_operating_state, watermaker_operating_state_raw))

    # production_start_stop | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    production_start_stop_raw = (data_raw >> 6) & 0x3
    production_start_stop = lookup_YES_NO(production_start_stop_raw)
    nmea2000Message.fields.append(NMEA2000Field('production_start_stop', 'Production Start/Stop', "", '', production_start_stop, production_start_stop_raw))

    # rinse_start_stop | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    rinse_start_stop_raw = (data_raw >> 8) & 0x3
    rinse_start_stop = lookup_YES_NO(rinse_start_stop_raw)
    nmea2000Message.fields.append(NMEA2000Field('rinse_start_stop', 'Rinse Start/Stop', "", '', rinse_start_stop, rinse_start_stop_raw))

    # low_pressure_pump_status | Offset: 10, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    low_pressure_pump_status_raw = (data_raw >> 10) & 0x3
    low_pressure_pump_status = lookup_YES_NO(low_pressure_pump_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('low_pressure_pump_status', 'Low Pressure Pump Status', "", '', low_pressure_pump_status, low_pressure_pump_status_raw))

    # high_pressure_pump_status | Offset: 12, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    high_pressure_pump_status_raw = (data_raw >> 12) & 0x3
    high_pressure_pump_status = lookup_YES_NO(high_pressure_pump_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('high_pressure_pump_status', 'High Pressure Pump Status', "", '', high_pressure_pump_status, high_pressure_pump_status_raw))

    # emergency_stop | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    emergency_stop_raw = (data_raw >> 14) & 0x3
    emergency_stop = lookup_YES_NO(emergency_stop_raw)
    nmea2000Message.fields.append(NMEA2000Field('emergency_stop', 'Emergency Stop', "", '', emergency_stop, emergency_stop_raw))

    # product_solenoid_valve_status | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    product_solenoid_valve_status_raw = (data_raw >> 16) & 0x3
    product_solenoid_valve_status = lookup_OK_WARNING(product_solenoid_valve_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('product_solenoid_valve_status', 'Product Solenoid Valve Status', "", '', product_solenoid_valve_status, product_solenoid_valve_status_raw))

    # flush_mode_status | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    flush_mode_status_raw = (data_raw >> 18) & 0x3
    flush_mode_status = lookup_YES_NO(flush_mode_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('flush_mode_status', 'Flush Mode Status', "", '', flush_mode_status, flush_mode_status_raw))

    # salinity_status | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    salinity_status_raw = (data_raw >> 20) & 0x3
    salinity_status = lookup_OK_WARNING(salinity_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('salinity_status', 'Salinity Status', "", '', salinity_status, salinity_status_raw))

    # sensor_status | Offset: 22, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    sensor_status_raw = (data_raw >> 22) & 0x3
    sensor_status = lookup_OK_WARNING(sensor_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('sensor_status', 'Sensor Status', "", '', sensor_status, sensor_status_raw))

    # oil_change_indicator_status | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    oil_change_indicator_status_raw = (data_raw >> 24) & 0x3
    oil_change_indicator_status = lookup_OK_WARNING(oil_change_indicator_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('oil_change_indicator_status', 'Oil Change Indicator Status', "", '', oil_change_indicator_status, oil_change_indicator_status_raw))

    # filter_status | Offset: 26, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    filter_status_raw = (data_raw >> 26) & 0x3
    filter_status = lookup_OK_WARNING(filter_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('filter_status', 'Filter Status', "", '', filter_status, filter_status_raw))

    # system_status | Offset: 28, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    system_status_raw = (data_raw >> 28) & 0x3
    system_status = lookup_OK_WARNING(system_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('system_status', 'System Status', "", '', system_status, system_status_raw))

    # reserved_30 | Offset: 30, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_30_raw = (data_raw >> 30) & 0x3
    reserved_30 = reserved_30_raw * 1 if reserved_30_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_30', 'Reserved', "", '', reserved_30, reserved_30_raw))

    # salinity | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    salinity_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    salinity = salinity_raw * 1 if salinity_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('salinity', 'Salinity', "", 'ppm', salinity, salinity_raw))

    # product_water_temperature | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    product_water_temperature_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    product_water_temperature = product_water_temperature_raw * 0.01 if product_water_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('product_water_temperature', 'Product Water Temperature', "", 'K', product_water_temperature, product_water_temperature_raw))

    # pre_filter_pressure | Offset: 64, Length: 16, Resolution: 100, Field Type: NUMBER, Match: 
    pre_filter_pressure_raw = decode_number((data_raw >> 64) & 0xFFFF, 16)
    pre_filter_pressure = pre_filter_pressure_raw * 100 if pre_filter_pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pre_filter_pressure', 'Pre-filter Pressure', "", 'Pa', pre_filter_pressure, pre_filter_pressure_raw))

    # post_filter_pressure | Offset: 80, Length: 16, Resolution: 100, Field Type: NUMBER, Match: 
    post_filter_pressure_raw = decode_number((data_raw >> 80) & 0xFFFF, 16)
    post_filter_pressure = post_filter_pressure_raw * 100 if post_filter_pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('post_filter_pressure', 'Post-filter Pressure', "", 'Pa', post_filter_pressure, post_filter_pressure_raw))

    # feed_pressure | Offset: 96, Length: 16, Resolution: 1000, Field Type: NUMBER, Match: 
    feed_pressure_raw = decode_number((data_raw >> 96) & 0xFFFF, 16)
    if feed_pressure_raw is not None and feed_pressure_raw & (1 << (16 - 1)):
        feed_pressure_raw -= (1 << 16)
    feed_pressure = feed_pressure_raw * 1000 if feed_pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('feed_pressure', 'Feed Pressure', "", 'Pa', feed_pressure, feed_pressure_raw))

    # system_high_pressure | Offset: 112, Length: 16, Resolution: 1000, Field Type: NUMBER, Match: 
    system_high_pressure_raw = decode_number((data_raw >> 112) & 0xFFFF, 16)
    system_high_pressure = system_high_pressure_raw * 1000 if system_high_pressure_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('system_high_pressure', 'System High Pressure', "", 'Pa', system_high_pressure, system_high_pressure_raw))

    # product_water_flow | Offset: 128, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    product_water_flow_raw = decode_number((data_raw >> 128) & 0xFFFF, 16)
    if product_water_flow_raw is not None and product_water_flow_raw & (1 << (16 - 1)):
        product_water_flow_raw -= (1 << 16)
    product_water_flow = product_water_flow_raw * 0.1 if product_water_flow_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('product_water_flow', 'Product Water Flow', "", 'L/h', product_water_flow, product_water_flow_raw))

    # brine_water_flow | Offset: 144, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    brine_water_flow_raw = decode_number((data_raw >> 144) & 0xFFFF, 16)
    if brine_water_flow_raw is not None and brine_water_flow_raw & (1 << (16 - 1)):
        brine_water_flow_raw -= (1 << 16)
    brine_water_flow = brine_water_flow_raw * 0.1 if brine_water_flow_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('brine_water_flow', 'Brine Water Flow', "", 'L/h', brine_water_flow, brine_water_flow_raw))

    # run_time | Offset: 160, Length: 32, Resolution: 1, Field Type: TIME, Match: 
    run_time_raw = (data_raw >> 160) & 0xFFFFFFFF
    run_time = decode_time(run_time_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('run_time', 'Run Time', "", 's', run_time, run_time_raw))

    return nmea2000Message

def encode_pgn_130567(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130567."""
    data_raw = 0
    # watermaker_operating_state | Offset: 0, Length: 6, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_WATERMAKER_STATE(f.value) for f in nmea2000Message.fields if f.id == 'watermaker_operating_state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Watermaker Operating State'")
    data_raw |= (field_value & 0x3F) << 0
    # production_start_stop | Offset: 6, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'production_start_stop'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Production Start/Stop'")
    data_raw |= (field_value & 0x3) << 6
    # rinse_start_stop | Offset: 8, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'rinse_start_stop'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Rinse Start/Stop'")
    data_raw |= (field_value & 0x3) << 8
    # low_pressure_pump_status | Offset: 10, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'low_pressure_pump_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Low Pressure Pump Status'")
    data_raw |= (field_value & 0x3) << 10
    # high_pressure_pump_status | Offset: 12, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'high_pressure_pump_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'High Pressure Pump Status'")
    data_raw |= (field_value & 0x3) << 12
    # emergency_stop | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'emergency_stop'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Emergency Stop'")
    data_raw |= (field_value & 0x3) << 14
    # product_solenoid_valve_status | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OK_WARNING(f.value) for f in nmea2000Message.fields if f.id == 'product_solenoid_valve_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Product Solenoid Valve Status'")
    data_raw |= (field_value & 0x3) << 16
    # flush_mode_status | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'flush_mode_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Flush Mode Status'")
    data_raw |= (field_value & 0x3) << 18
    # salinity_status | Offset: 20, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OK_WARNING(f.value) for f in nmea2000Message.fields if f.id == 'salinity_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Salinity Status'")
    data_raw |= (field_value & 0x3) << 20
    # sensor_status | Offset: 22, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OK_WARNING(f.value) for f in nmea2000Message.fields if f.id == 'sensor_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sensor Status'")
    data_raw |= (field_value & 0x3) << 22
    # oil_change_indicator_status | Offset: 24, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OK_WARNING(f.value) for f in nmea2000Message.fields if f.id == 'oil_change_indicator_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Oil Change Indicator Status'")
    data_raw |= (field_value & 0x3) << 24
    # filter_status | Offset: 26, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OK_WARNING(f.value) for f in nmea2000Message.fields if f.id == 'filter_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Filter Status'")
    data_raw |= (field_value & 0x3) << 26
    # system_status | Offset: 28, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OK_WARNING(f.value) for f in nmea2000Message.fields if f.id == 'system_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'System Status'")
    data_raw |= (field_value & 0x3) << 28
    # reserved_30 | Offset: 30, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_30'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 30
    # salinity | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'salinity'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Salinity'")
    data_raw |= (field_value & 0xFFFF) << 32
    # product_water_temperature | Offset: 48, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'product_water_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Product Water Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 48
    
    # pre_filter_pressure | Offset: 64, Length: 16, Resolution: 100, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pre_filter_pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Pre-filter Pressure'")        
    data_raw |= (int(field_value / 100) & 0xFFFF) << 64
    
    # post_filter_pressure | Offset: 80, Length: 16, Resolution: 100, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'post_filter_pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Post-filter Pressure'")        
    data_raw |= (int(field_value / 100) & 0xFFFF) << 80
    
    # feed_pressure | Offset: 96, Length: 16, Resolution: 1000, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'feed_pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Feed Pressure'")        
    data_raw |= (int(field_value / 1000) & 0xFFFF) << 96
    
    # system_high_pressure | Offset: 112, Length: 16, Resolution: 1000, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'system_high_pressure'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'System High Pressure'")        
    data_raw |= (int(field_value / 1000) & 0xFFFF) << 112
    
    # product_water_flow | Offset: 128, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'product_water_flow'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Product Water Flow'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 128
    
    # brine_water_flow | Offset: 144, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'brine_water_flow'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Brine Water Flow'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 144
    
    # run_time | Offset: 160, Length: 32, Resolution: 1, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'run_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Run Time'")
    data_raw |= (field_value & 0xFFFFFFFF) << 160
    return data_raw


def is_fast_pgn_130569() -> bool:
    """Return True if PGN 130569 is a fast PGN."""
    return True
def decode_pgn_130569(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130569."""
    nmea2000Message = NMEA2000Message(130569, 'currentStatusAndFile', 'Current Status and File')
    # zone | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    zone_raw = (data_raw >> 0) & 0xFF
    zone = lookup_ENTERTAINMENT_ZONE(zone_raw)
    nmea2000Message.fields.append(NMEA2000Field('zone', 'Zone', "", '', zone, zone_raw))

    # source | Offset: 8, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 8) & 0xFF
    source = lookup_ENTERTAINMENT_SOURCE(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    # number | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    number = number_raw * 1 if number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number', 'Number', "Source number per type", '', number, number_raw))

    # id | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    id_raw = decode_number((data_raw >> 24) & 0xFFFFFFFF, 32)
    id = id_raw * 1 if id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('id', 'ID', "Unique file ID", '', id, id_raw))

    # play_status | Offset: 56, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    play_status_raw = (data_raw >> 56) & 0xFF
    play_status = lookup_ENTERTAINMENT_PLAY_STATUS(play_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('play_status', 'Play status', "", '', play_status, play_status_raw))

    # elapsed_track_time | Offset: 64, Length: 16, Resolution: 1, Field Type: TIME, Match: 
    elapsed_track_time_raw = (data_raw >> 64) & 0xFFFF
    elapsed_track_time = decode_time(elapsed_track_time_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('elapsed_track_time', 'Elapsed Track Time', "", 's', elapsed_track_time, elapsed_track_time_raw))

    # track_time | Offset: 80, Length: 16, Resolution: 1, Field Type: TIME, Match: 
    track_time_raw = (data_raw >> 80) & 0xFFFF
    track_time = decode_time(track_time_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('track_time', 'Track Time', "", 's', track_time, track_time_raw))

    # repeat_status | Offset: 96, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_status_raw = (data_raw >> 96) & 0xF
    repeat_status = lookup_ENTERTAINMENT_REPEAT_STATUS(repeat_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_status', 'Repeat Status', "", '', repeat_status, repeat_status_raw))

    # shuffle_status | Offset: 100, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    shuffle_status_raw = (data_raw >> 100) & 0xF
    shuffle_status = lookup_ENTERTAINMENT_SHUFFLE_STATUS(shuffle_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('shuffle_status', 'Shuffle Status', "", '', shuffle_status, shuffle_status_raw))

    # save_favorite_number | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    save_favorite_number_raw = decode_number((data_raw >> 104) & 0xFF, 8)
    save_favorite_number = save_favorite_number_raw * 1 if save_favorite_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('save_favorite_number', 'Save Favorite Number', "Used to command AV to save current station as favorite", '', save_favorite_number, save_favorite_number_raw))

    # play_favorite_number | Offset: 112, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    play_favorite_number_raw = decode_number((data_raw >> 112) & 0xFFFF, 16)
    play_favorite_number = play_favorite_number_raw * 1 if play_favorite_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('play_favorite_number', 'Play Favorite Number', "Used to command AV to play indicated favorite station", '', play_favorite_number, play_favorite_number_raw))

    # thumbs_up_down | Offset: 128, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    thumbs_up_down_raw = (data_raw >> 128) & 0xFF
    thumbs_up_down = lookup_ENTERTAINMENT_LIKE_STATUS(thumbs_up_down_raw)
    nmea2000Message.fields.append(NMEA2000Field('thumbs_up_down', 'Thumbs Up/Down', "", '', thumbs_up_down, thumbs_up_down_raw))

    # signal_strength | Offset: 136, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    signal_strength_raw = decode_number((data_raw >> 136) & 0xFF, 8)
    signal_strength = signal_strength_raw * 1 if signal_strength_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('signal_strength', 'Signal Strength', "", '%', signal_strength, signal_strength_raw))

    # radio_frequency | Offset: 144, Length: 32, Resolution: 10, Field Type: NUMBER, Match: 
    radio_frequency_raw = decode_number((data_raw >> 144) & 0xFFFFFFFF, 32)
    radio_frequency = radio_frequency_raw * 10 if radio_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('radio_frequency', 'Radio Frequency', "", 'Hz', radio_frequency, radio_frequency_raw))

    # hd_frequency_multicast | Offset: 176, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    hd_frequency_multicast_raw = decode_number((data_raw >> 176) & 0xFF, 8)
    hd_frequency_multicast = hd_frequency_multicast_raw * 1 if hd_frequency_multicast_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('hd_frequency_multicast', 'HD Frequency Multicast', "Digital sub channel", '', hd_frequency_multicast, hd_frequency_multicast_raw))

    # delete_favorite_number | Offset: 184, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    delete_favorite_number_raw = decode_number((data_raw >> 184) & 0xFF, 8)
    delete_favorite_number = delete_favorite_number_raw * 1 if delete_favorite_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('delete_favorite_number', 'Delete Favorite Number', "Used to command AV to delete current station as favorite", '', delete_favorite_number, delete_favorite_number_raw))

    # total_number_of_tracks | Offset: 192, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    total_number_of_tracks_raw = decode_number((data_raw >> 192) & 0xFFFF, 16)
    total_number_of_tracks = total_number_of_tracks_raw * 1 if total_number_of_tracks_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_number_of_tracks', 'Total Number of Tracks', "", '', total_number_of_tracks, total_number_of_tracks_raw))

    return nmea2000Message

def encode_pgn_130569(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130569."""
    data_raw = 0
    # zone | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_ZONE(f.value) for f in nmea2000Message.fields if f.id == 'zone'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone'")
    data_raw |= (field_value & 0xFF) << 0
    # source | Offset: 8, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xFF) << 8
    # number | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number'")
    data_raw |= (field_value & 0xFF) << 16
    # id | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 24
    # play_status | Offset: 56, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_PLAY_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'play_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Play status'")
    data_raw |= (field_value & 0xFF) << 56
    # elapsed_track_time | Offset: 64, Length: 16, Resolution: 1, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'elapsed_track_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Elapsed Track Time'")
    data_raw |= (field_value & 0xFFFF) << 64
    # track_time | Offset: 80, Length: 16, Resolution: 1, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'track_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Track Time'")
    data_raw |= (field_value & 0xFFFF) << 80
    # repeat_status | Offset: 96, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_REPEAT_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'repeat_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Status'")
    data_raw |= (field_value & 0xF) << 96
    # shuffle_status | Offset: 100, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_SHUFFLE_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'shuffle_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Shuffle Status'")
    data_raw |= (field_value & 0xF) << 100
    # save_favorite_number | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'save_favorite_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Save Favorite Number'")
    data_raw |= (field_value & 0xFF) << 104
    # play_favorite_number | Offset: 112, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'play_favorite_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Play Favorite Number'")
    data_raw |= (field_value & 0xFFFF) << 112
    # thumbs_up_down | Offset: 128, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_LIKE_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'thumbs_up_down'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Thumbs Up/Down'")
    data_raw |= (field_value & 0xFF) << 128
    # signal_strength | Offset: 136, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'signal_strength'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Signal Strength'")
    data_raw |= (field_value & 0xFF) << 136
    # radio_frequency | Offset: 144, Length: 32, Resolution: 10, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'radio_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Radio Frequency'")        
    data_raw |= (int(field_value / 10) & 0xFFFFFFFF) << 144
    
    # hd_frequency_multicast | Offset: 176, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'hd_frequency_multicast'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'HD Frequency Multicast'")
    data_raw |= (field_value & 0xFF) << 176
    # delete_favorite_number | Offset: 184, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'delete_favorite_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Delete Favorite Number'")
    data_raw |= (field_value & 0xFF) << 184
    # total_number_of_tracks | Offset: 192, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_number_of_tracks'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total Number of Tracks'")
    data_raw |= (field_value & 0xFFFF) << 192
    return data_raw


def is_fast_pgn_130570() -> bool:
    """Return True if PGN 130570 is a fast PGN."""
    return True
def decode_pgn_130570(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130570."""
    nmea2000Message = NMEA2000Message(130570, 'libraryDataFile', 'Library Data File')
    # source | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 0) & 0xFF
    source = lookup_ENTERTAINMENT_SOURCE(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    # number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    number = number_raw * 1 if number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number', 'Number', "Source number per type", '', number, number_raw))

    # id | Offset: 16, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    id_raw = decode_number((data_raw >> 16) & 0xFFFFFFFF, 32)
    id = id_raw * 1 if id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('id', 'ID', "Unique file ID", '', id, id_raw))

    # type | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    type_raw = (data_raw >> 48) & 0xFF
    type = lookup_ENTERTAINMENT_TYPE(type_raw)
    nmea2000Message.fields.append(NMEA2000Field('type', 'Type', "", '', type, type_raw))














    return nmea2000Message

def encode_pgn_130570(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130570."""
    data_raw = 0
    # source | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xFF) << 0
    # number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number'")
    data_raw |= (field_value & 0xFF) << 8
    # id | Offset: 16, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 16
    # type | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Type'")
    data_raw |= (field_value & 0xFF) << 48
    raise Exception ("PGN 130570 not supporting encoding for now as Name is missing BitLength or BitOffset")
    raise Exception ("PGN 130570 not supporting encoding for now as Track is missing BitLength or BitOffset")
    raise Exception ("PGN 130570 not supporting encoding for now as Station is missing BitLength or BitOffset")
    raise Exception ("PGN 130570 not supporting encoding for now as Favorite is missing BitLength or BitOffset")
    raise Exception ("PGN 130570 not supporting encoding for now as Radio Frequency is missing BitLength or BitOffset")
    raise Exception ("PGN 130570 not supporting encoding for now as HD Frequency is missing BitLength or BitOffset")
    raise Exception ("PGN 130570 not supporting encoding for now as Zone is missing BitLength or BitOffset")
    raise Exception ("PGN 130570 not supporting encoding for now as In play queue is missing BitLength or BitOffset")
    raise Exception ("PGN 130570 not supporting encoding for now as Locked is missing BitLength or BitOffset")
    raise Exception ("PGN 130570 not supporting encoding for now as Reserved is missing BitLength or BitOffset")
    raise Exception ("PGN 130570 not supporting encoding for now as Artist Name is missing BitLength or BitOffset")
    raise Exception ("PGN 130570 not supporting encoding for now as Album Name is missing BitLength or BitOffset")
    raise Exception ("PGN 130570 not supporting encoding for now as Station Name is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130571() -> bool:
    """Return True if PGN 130571 is a fast PGN."""
    return True
def decode_pgn_130571(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130571."""
    nmea2000Message = NMEA2000Message(130571, 'libraryDataGroup', 'Library Data Group')
    # source | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 0) & 0xFF
    source = lookup_ENTERTAINMENT_SOURCE(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    # number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    number = number_raw * 1 if number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number', 'Number', "Source number per type", '', number, number_raw))

    # type | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    type_raw = (data_raw >> 16) & 0xFF
    type = lookup_ENTERTAINMENT_TYPE(type_raw)
    nmea2000Message.fields.append(NMEA2000Field('type', 'Type', "", '', type, type_raw))

    # zone | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    zone_raw = (data_raw >> 24) & 0xFF
    zone = lookup_ENTERTAINMENT_ZONE(zone_raw)
    nmea2000Message.fields.append(NMEA2000Field('zone', 'Zone', "", '', zone, zone_raw))

    # group_id | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    group_id_raw = decode_number((data_raw >> 32) & 0xFFFFFFFF, 32)
    group_id = group_id_raw * 1 if group_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('group_id', 'Group ID', "Unique group ID", '', group_id, group_id_raw))

    # id_offset | Offset: 64, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    id_offset_raw = decode_number((data_raw >> 64) & 0xFFFF, 16)
    id_offset = id_offset_raw * 1 if id_offset_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('id_offset', 'ID offset', "First ID in this PGN", '', id_offset, id_offset_raw))

    # id_count | Offset: 80, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    id_count_raw = decode_number((data_raw >> 80) & 0xFFFF, 16)
    id_count = id_count_raw * 1 if id_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('id_count', 'ID count', "Number of IDs in this PGN", '', id_count, id_count_raw))

    # total_id_count | Offset: 96, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    total_id_count_raw = decode_number((data_raw >> 96) & 0xFFFF, 16)
    total_id_count = total_id_count_raw * 1 if total_id_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_id_count', 'Total ID count', "Total IDs in group", '', total_id_count, total_id_count_raw))

    # id_type | Offset: 112, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    id_type_raw = (data_raw >> 112) & 0xFF
    id_type = lookup_ENTERTAINMENT_ID_TYPE(id_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('id_type', 'ID type', "", '', id_type, id_type_raw))

    # id | Offset: 120, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    id_raw = decode_number((data_raw >> 120) & 0xFFFFFFFF, 32)
    id = id_raw * 1 if id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('id', 'ID', "", '', id, id_raw))



    return nmea2000Message

def encode_pgn_130571(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130571."""
    data_raw = 0
    # source | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xFF) << 0
    # number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number'")
    data_raw |= (field_value & 0xFF) << 8
    # type | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Type'")
    data_raw |= (field_value & 0xFF) << 16
    # zone | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_ZONE(f.value) for f in nmea2000Message.fields if f.id == 'zone'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone'")
    data_raw |= (field_value & 0xFF) << 24
    # group_id | Offset: 32, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'group_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    # id_offset | Offset: 64, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'id_offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ID offset'")
    data_raw |= (field_value & 0xFFFF) << 64
    # id_count | Offset: 80, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'id_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ID count'")
    data_raw |= (field_value & 0xFFFF) << 80
    # total_id_count | Offset: 96, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_id_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total ID count'")
    data_raw |= (field_value & 0xFFFF) << 96
    # id_type | Offset: 112, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_ID_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'id_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ID type'")
    data_raw |= (field_value & 0xFF) << 112
    # id | Offset: 120, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 120
    raise Exception ("PGN 130571 not supporting encoding for now as Name is missing BitLength or BitOffset")
    raise Exception ("PGN 130571 not supporting encoding for now as Artist is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130572() -> bool:
    """Return True if PGN 130572 is a fast PGN."""
    return True
def decode_pgn_130572(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130572."""
    nmea2000Message = NMEA2000Message(130572, 'libraryDataSearch', 'Library Data Search')
    # source | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 0) & 0xFF
    source = lookup_ENTERTAINMENT_SOURCE(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    # number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    number = number_raw * 1 if number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number', 'Number', "Source number per type", '', number, number_raw))

    # group_id | Offset: 16, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    group_id_raw = decode_number((data_raw >> 16) & 0xFFFFFFFF, 32)
    group_id = group_id_raw * 1 if group_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('group_id', 'Group ID', "Unique group ID", '', group_id, group_id_raw))

    # group_type_1 | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    group_type_1_raw = (data_raw >> 48) & 0xFF
    group_type_1 = lookup_ENTERTAINMENT_GROUP(group_type_1_raw)
    nmea2000Message.fields.append(NMEA2000Field('group_type_1', 'Group type 1', "", '', group_type_1, group_type_1_raw))






    return nmea2000Message

def encode_pgn_130572(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130572."""
    data_raw = 0
    # source | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xFF) << 0
    # number | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number'")
    data_raw |= (field_value & 0xFF) << 8
    # group_id | Offset: 16, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'group_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 16
    # group_type_1 | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_GROUP(f.value) for f in nmea2000Message.fields if f.id == 'group_type_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Group type 1'")
    data_raw |= (field_value & 0xFF) << 48
    raise Exception ("PGN 130572 not supporting encoding for now as Group name 1 is missing BitLength or BitOffset")
    raise Exception ("PGN 130572 not supporting encoding for now as Group type 2 is missing BitLength or BitOffset")
    raise Exception ("PGN 130572 not supporting encoding for now as Group name 2 is missing BitLength or BitOffset")
    raise Exception ("PGN 130572 not supporting encoding for now as Group type 3 is missing BitLength or BitOffset")
    raise Exception ("PGN 130572 not supporting encoding for now as Group name 3 is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130573() -> bool:
    """Return True if PGN 130573 is a fast PGN."""
    return True
def decode_pgn_130573(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130573."""
    nmea2000Message = NMEA2000Message(130573, 'supportedSourceData', 'Supported Source Data')
    # id_offset | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    id_offset_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    id_offset = id_offset_raw * 1 if id_offset_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('id_offset', 'ID offset', "First ID in this PGN", '', id_offset, id_offset_raw))

    # id_count | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    id_count_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    id_count = id_count_raw * 1 if id_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('id_count', 'ID count', "Number of IDs in this PGN", '', id_count, id_count_raw))

    # total_id_count | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    total_id_count_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    total_id_count = total_id_count_raw * 1 if total_id_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_id_count', 'Total ID count', "Total IDs in group", '', total_id_count, total_id_count_raw))

    # id | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    id_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    id = id_raw * 1 if id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('id', 'ID', "Source ID", '', id, id_raw))

    # source | Offset: 56, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 56) & 0xFF
    source = lookup_ENTERTAINMENT_SOURCE(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    # number | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_raw = decode_number((data_raw >> 64) & 0xFF, 8)
    number = number_raw * 1 if number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number', 'Number', "Source number per type", '', number, number_raw))








    return nmea2000Message

def encode_pgn_130573(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130573."""
    data_raw = 0
    # id_offset | Offset: 0, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'id_offset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ID offset'")
    data_raw |= (field_value & 0xFFFF) << 0
    # id_count | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'id_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ID count'")
    data_raw |= (field_value & 0xFFFF) << 16
    # total_id_count | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_id_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total ID count'")
    data_raw |= (field_value & 0xFFFF) << 32
    # id | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ID'")
    data_raw |= (field_value & 0xFF) << 48
    # source | Offset: 56, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xFF) << 56
    # number | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number'")
    data_raw |= (field_value & 0xFF) << 64
    raise Exception ("PGN 130573 not supporting encoding for now as Name is missing BitLength or BitOffset")
    raise Exception ("PGN 130573 not supporting encoding for now as Play support is missing BitLength or BitOffset")
    raise Exception ("PGN 130573 not supporting encoding for now as Browse support is missing BitLength or BitOffset")
    raise Exception ("PGN 130573 not supporting encoding for now as Thumbs support is missing BitLength or BitOffset")
    raise Exception ("PGN 130573 not supporting encoding for now as Connected is missing BitLength or BitOffset")
    raise Exception ("PGN 130573 not supporting encoding for now as Repeat support is missing BitLength or BitOffset")
    raise Exception ("PGN 130573 not supporting encoding for now as Shuffle support is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130574() -> bool:
    """Return True if PGN 130574 is a fast PGN."""
    return True
def decode_pgn_130574(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130574."""
    nmea2000Message = NMEA2000Message(130574, 'supportedZoneData', 'Supported Zone Data')
    # first_zone_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    first_zone_id_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    first_zone_id = first_zone_id_raw * 1 if first_zone_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('first_zone_id', 'First zone ID', "First Zone in this PGN", '', first_zone_id, first_zone_id_raw))

    # zone_count | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_count_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    zone_count = zone_count_raw * 1 if zone_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone_count', 'Zone count', "Number of Zones in this PGN", '', zone_count, zone_count_raw))

    # total_zone_count | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    total_zone_count_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    total_zone_count = total_zone_count_raw * 1 if total_zone_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_zone_count', 'Total zone count', "Total Zones supported by this device", '', total_zone_count, total_zone_count_raw))

    # zone_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    zone_id_raw = (data_raw >> 24) & 0xFF
    zone_id = lookup_ENTERTAINMENT_ZONE(zone_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('zone_id', 'Zone ID', "", '', zone_id, zone_id_raw))


    return nmea2000Message

def encode_pgn_130574(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130574."""
    data_raw = 0
    # first_zone_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'first_zone_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'First zone ID'")
    data_raw |= (field_value & 0xFF) << 0
    # zone_count | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone count'")
    data_raw |= (field_value & 0xFF) << 8
    # total_zone_count | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_zone_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total zone count'")
    data_raw |= (field_value & 0xFF) << 16
    # zone_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_ZONE(f.value) for f in nmea2000Message.fields if f.id == 'zone_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone ID'")
    data_raw |= (field_value & 0xFF) << 24
    raise Exception ("PGN 130574 not supporting encoding for now as Name is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130576() -> bool:
    """Return True if PGN 130576 is a fast PGN."""
    return False
def decode_pgn_130576(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130576."""
    nmea2000Message = NMEA2000Message(130576, 'smallCraftStatus', 'Small Craft Status')
    # port_trim_tab | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    port_trim_tab_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    if port_trim_tab_raw is not None and port_trim_tab_raw & (1 << (8 - 1)):
        port_trim_tab_raw -= (1 << 8)
    port_trim_tab = port_trim_tab_raw * 1 if port_trim_tab_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('port_trim_tab', 'Port trim tab', "", '%', port_trim_tab, port_trim_tab_raw))

    # starboard_trim_tab | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    starboard_trim_tab_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    if starboard_trim_tab_raw is not None and starboard_trim_tab_raw & (1 << (8 - 1)):
        starboard_trim_tab_raw -= (1 << 8)
    starboard_trim_tab = starboard_trim_tab_raw * 1 if starboard_trim_tab_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('starboard_trim_tab', 'Starboard trim tab', "", '%', starboard_trim_tab, starboard_trim_tab_raw))

    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFFFFFFFFFFFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    return nmea2000Message

def encode_pgn_130576(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130576."""
    data_raw = 0
    # port_trim_tab | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'port_trim_tab'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Port trim tab'")
    data_raw |= (field_value & 0xFF) << 0
    # starboard_trim_tab | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'starboard_trim_tab'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Starboard trim tab'")
    data_raw |= (field_value & 0xFF) << 8
    # reserved_16 | Offset: 16, Length: 48, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 16
    return data_raw


def is_fast_pgn_130577() -> bool:
    """Return True if PGN 130577 is a fast PGN."""
    return True
def decode_pgn_130577(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130577."""
    nmea2000Message = NMEA2000Message(130577, 'directionData', 'Direction Data')
    # data_mode | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    data_mode_raw = (data_raw >> 0) & 0xF
    data_mode = lookup_RESIDUAL_MODE(data_mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('data_mode', 'Data Mode', "", '', data_mode, data_mode_raw))

    # cog_reference | Offset: 4, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    cog_reference_raw = (data_raw >> 4) & 0x3
    cog_reference = lookup_DIRECTION_REFERENCE(cog_reference_raw)
    nmea2000Message.fields.append(NMEA2000Field('cog_reference', 'COG Reference', "", '', cog_reference, cog_reference_raw))

    # reserved_6 | Offset: 6, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_6_raw = (data_raw >> 6) & 0x3
    reserved_6 = reserved_6_raw * 1 if reserved_6_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_6', 'Reserved', "", '', reserved_6, reserved_6_raw))

    # sid | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # cog | Offset: 16, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    cog_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    cog = cog_raw * 0.0001 if cog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('cog', 'COG', "", 'rad', cog, cog_raw))

    # sog | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    sog_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    sog = sog_raw * 0.01 if sog_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sog', 'SOG', "", 'm/s', sog, sog_raw))

    # heading | Offset: 48, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    heading_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    heading = heading_raw * 0.0001 if heading_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('heading', 'Heading', "", 'rad', heading, heading_raw))

    # speed_through_water | Offset: 64, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    speed_through_water_raw = decode_number((data_raw >> 64) & 0xFFFF, 16)
    speed_through_water = speed_through_water_raw * 0.01 if speed_through_water_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('speed_through_water', 'Speed through Water', "", 'm/s', speed_through_water, speed_through_water_raw))

    # set | Offset: 80, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    set_raw = decode_number((data_raw >> 80) & 0xFFFF, 16)
    set = set_raw * 0.0001 if set_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('set', 'Set', "", 'rad', set, set_raw))

    # drift | Offset: 96, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    drift_raw = decode_number((data_raw >> 96) & 0xFFFF, 16)
    drift = drift_raw * 0.01 if drift_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('drift', 'Drift', "", 'm/s', drift, drift_raw))

    return nmea2000Message

def encode_pgn_130577(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130577."""
    data_raw = 0
    # data_mode | Offset: 0, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_RESIDUAL_MODE(f.value) for f in nmea2000Message.fields if f.id == 'data_mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Mode'")
    data_raw |= (field_value & 0xF) << 0
    # cog_reference | Offset: 4, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_DIRECTION_REFERENCE(f.value) for f in nmea2000Message.fields if f.id == 'cog_reference'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'COG Reference'")
    data_raw |= (field_value & 0x3) << 4
    # reserved_6 | Offset: 6, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_6'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 6
    # sid | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 8
    # cog | Offset: 16, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'cog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'COG'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 16
    
    # sog | Offset: 32, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sog'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SOG'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 32
    
    # heading | Offset: 48, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'heading'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Heading'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 48
    
    # speed_through_water | Offset: 64, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'speed_through_water'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Speed through Water'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 64
    
    # set | Offset: 80, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'set'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Set'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 80
    
    # drift | Offset: 96, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'drift'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Drift'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 96
    
    return data_raw


def is_fast_pgn_130578() -> bool:
    """Return True if PGN 130578 is a fast PGN."""
    return True
def decode_pgn_130578(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130578."""
    nmea2000Message = NMEA2000Message(130578, 'vesselSpeedComponents', 'Vessel Speed Components')
    # longitudinal_speed__water_referenced | Offset: 0, Length: 16, Resolution: 0.001, Field Type: NUMBER, Match: 
    longitudinal_speed__water_referenced_raw = decode_number((data_raw >> 0) & 0xFFFF, 16)
    if longitudinal_speed__water_referenced_raw is not None and longitudinal_speed__water_referenced_raw & (1 << (16 - 1)):
        longitudinal_speed__water_referenced_raw -= (1 << 16)
    longitudinal_speed__water_referenced = longitudinal_speed__water_referenced_raw * 0.001 if longitudinal_speed__water_referenced_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitudinal_speed__water_referenced', 'Longitudinal Speed, Water-referenced', "", 'm/s', longitudinal_speed__water_referenced, longitudinal_speed__water_referenced_raw))

    # transverse_speed__water_referenced | Offset: 16, Length: 16, Resolution: 0.001, Field Type: NUMBER, Match: 
    transverse_speed__water_referenced_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    if transverse_speed__water_referenced_raw is not None and transverse_speed__water_referenced_raw & (1 << (16 - 1)):
        transverse_speed__water_referenced_raw -= (1 << 16)
    transverse_speed__water_referenced = transverse_speed__water_referenced_raw * 0.001 if transverse_speed__water_referenced_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('transverse_speed__water_referenced', 'Transverse Speed, Water-referenced', "", 'm/s', transverse_speed__water_referenced, transverse_speed__water_referenced_raw))

    # longitudinal_speed__ground_referenced | Offset: 32, Length: 16, Resolution: 0.001, Field Type: NUMBER, Match: 
    longitudinal_speed__ground_referenced_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    if longitudinal_speed__ground_referenced_raw is not None and longitudinal_speed__ground_referenced_raw & (1 << (16 - 1)):
        longitudinal_speed__ground_referenced_raw -= (1 << 16)
    longitudinal_speed__ground_referenced = longitudinal_speed__ground_referenced_raw * 0.001 if longitudinal_speed__ground_referenced_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('longitudinal_speed__ground_referenced', 'Longitudinal Speed, Ground-referenced', "", 'm/s', longitudinal_speed__ground_referenced, longitudinal_speed__ground_referenced_raw))

    # transverse_speed__ground_referenced | Offset: 48, Length: 16, Resolution: 0.001, Field Type: NUMBER, Match: 
    transverse_speed__ground_referenced_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    if transverse_speed__ground_referenced_raw is not None and transverse_speed__ground_referenced_raw & (1 << (16 - 1)):
        transverse_speed__ground_referenced_raw -= (1 << 16)
    transverse_speed__ground_referenced = transverse_speed__ground_referenced_raw * 0.001 if transverse_speed__ground_referenced_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('transverse_speed__ground_referenced', 'Transverse Speed, Ground-referenced', "", 'm/s', transverse_speed__ground_referenced, transverse_speed__ground_referenced_raw))

    # stern_speed__water_referenced | Offset: 64, Length: 16, Resolution: 0.001, Field Type: NUMBER, Match: 
    stern_speed__water_referenced_raw = decode_number((data_raw >> 64) & 0xFFFF, 16)
    if stern_speed__water_referenced_raw is not None and stern_speed__water_referenced_raw & (1 << (16 - 1)):
        stern_speed__water_referenced_raw -= (1 << 16)
    stern_speed__water_referenced = stern_speed__water_referenced_raw * 0.001 if stern_speed__water_referenced_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('stern_speed__water_referenced', 'Stern Speed, Water-referenced', "", 'm/s', stern_speed__water_referenced, stern_speed__water_referenced_raw))

    # stern_speed__ground_referenced | Offset: 80, Length: 16, Resolution: 0.001, Field Type: NUMBER, Match: 
    stern_speed__ground_referenced_raw = decode_number((data_raw >> 80) & 0xFFFF, 16)
    if stern_speed__ground_referenced_raw is not None and stern_speed__ground_referenced_raw & (1 << (16 - 1)):
        stern_speed__ground_referenced_raw -= (1 << 16)
    stern_speed__ground_referenced = stern_speed__ground_referenced_raw * 0.001 if stern_speed__ground_referenced_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('stern_speed__ground_referenced', 'Stern Speed, Ground-referenced', "", 'm/s', stern_speed__ground_referenced, stern_speed__ground_referenced_raw))

    return nmea2000Message

def encode_pgn_130578(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130578."""
    data_raw = 0
    # longitudinal_speed__water_referenced | Offset: 0, Length: 16, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitudinal_speed__water_referenced'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitudinal Speed, Water-referenced'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 0
    
    # transverse_speed__water_referenced | Offset: 16, Length: 16, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'transverse_speed__water_referenced'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Transverse Speed, Water-referenced'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 16
    
    # longitudinal_speed__ground_referenced | Offset: 32, Length: 16, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'longitudinal_speed__ground_referenced'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Longitudinal Speed, Ground-referenced'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 32
    
    # transverse_speed__ground_referenced | Offset: 48, Length: 16, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'transverse_speed__ground_referenced'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Transverse Speed, Ground-referenced'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 48
    
    # stern_speed__water_referenced | Offset: 64, Length: 16, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'stern_speed__water_referenced'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Stern Speed, Water-referenced'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 64
    
    # stern_speed__ground_referenced | Offset: 80, Length: 16, Resolution: 0.001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'stern_speed__ground_referenced'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Stern Speed, Ground-referenced'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFF) << 80
    
    return data_raw


def is_fast_pgn_130579() -> bool:
    """Return True if PGN 130579 is a fast PGN."""
    return False
def decode_pgn_130579(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130579."""
    nmea2000Message = NMEA2000Message(130579, 'systemConfiguration', 'System Configuration')
    # power | Offset: 0, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    power_raw = (data_raw >> 0) & 0x3
    power = lookup_YES_NO(power_raw)
    nmea2000Message.fields.append(NMEA2000Field('power', 'Power', "", '', power, power_raw))

    # default_settings | Offset: 2, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    default_settings_raw = (data_raw >> 2) & 0x3
    default_settings = lookup_ENTERTAINMENT_DEFAULT_SETTINGS(default_settings_raw)
    nmea2000Message.fields.append(NMEA2000Field('default_settings', 'Default Settings', "", '', default_settings, default_settings_raw))

    # tuner_regions | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    tuner_regions_raw = (data_raw >> 4) & 0xF
    tuner_regions = lookup_ENTERTAINMENT_REGIONS(tuner_regions_raw)
    nmea2000Message.fields.append(NMEA2000Field('tuner_regions', 'Tuner regions', "", '', tuner_regions, tuner_regions_raw))

    # max_favorites | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    max_favorites_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    max_favorites = max_favorites_raw * 1 if max_favorites_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('max_favorites', 'Max favorites', "", '', max_favorites, max_favorites_raw))

    # video_protocols | Offset: 16, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    video_protocols_raw = (data_raw >> 16) & 0xF
    video_protocols = lookup_VIDEO_PROTOCOLS(video_protocols_raw)
    nmea2000Message.fields.append(NMEA2000Field('video_protocols', 'Video protocols', "", '', video_protocols, video_protocols_raw))

    # reserved_20 | Offset: 20, Length: 44, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_20_raw = (data_raw >> 20) & 0xFFFFFFFFFFF
    reserved_20 = reserved_20_raw * 1 if reserved_20_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_20', 'Reserved', "", '', reserved_20, reserved_20_raw))

    return nmea2000Message

def encode_pgn_130579(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130579."""
    data_raw = 0
    # power | Offset: 0, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power'")
    data_raw |= (field_value & 0x3) << 0
    # default_settings | Offset: 2, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_DEFAULT_SETTINGS(f.value) for f in nmea2000Message.fields if f.id == 'default_settings'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Default Settings'")
    data_raw |= (field_value & 0x3) << 2
    # tuner_regions | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_REGIONS(f.value) for f in nmea2000Message.fields if f.id == 'tuner_regions'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Tuner regions'")
    data_raw |= (field_value & 0xF) << 4
    # max_favorites | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'max_favorites'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Max favorites'")
    data_raw |= (field_value & 0xFF) << 8
    # video_protocols | Offset: 16, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_VIDEO_PROTOCOLS(f.value) for f in nmea2000Message.fields if f.id == 'video_protocols'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Video protocols'")
    data_raw |= (field_value & 0xF) << 16
    # reserved_20 | Offset: 20, Length: 44, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_20'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFFFFF) << 20
    return data_raw


def is_fast_pgn_130580() -> bool:
    """Return True if PGN 130580 is a fast PGN."""
    return True
def decode_pgn_130580(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130580."""
    nmea2000Message = NMEA2000Message(130580, 'systemConfigurationDeprecated', 'System Configuration (deprecated)')
    # power | Offset: 0, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    power_raw = (data_raw >> 0) & 0x3
    power = lookup_YES_NO(power_raw)
    nmea2000Message.fields.append(NMEA2000Field('power', 'Power', "", '', power, power_raw))

    # default_settings | Offset: 2, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    default_settings_raw = (data_raw >> 2) & 0x3
    default_settings = lookup_ENTERTAINMENT_DEFAULT_SETTINGS(default_settings_raw)
    nmea2000Message.fields.append(NMEA2000Field('default_settings', 'Default Settings', "", '', default_settings, default_settings_raw))

    # tuner_regions | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    tuner_regions_raw = (data_raw >> 4) & 0xF
    tuner_regions = lookup_ENTERTAINMENT_REGIONS(tuner_regions_raw)
    nmea2000Message.fields.append(NMEA2000Field('tuner_regions', 'Tuner regions', "", '', tuner_regions, tuner_regions_raw))

    # max_favorites | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    max_favorites_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    max_favorites = max_favorites_raw * 1 if max_favorites_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('max_favorites', 'Max favorites', "", '', max_favorites, max_favorites_raw))

    return nmea2000Message

def encode_pgn_130580(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130580."""
    data_raw = 0
    # power | Offset: 0, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'power'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Power'")
    data_raw |= (field_value & 0x3) << 0
    # default_settings | Offset: 2, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_DEFAULT_SETTINGS(f.value) for f in nmea2000Message.fields if f.id == 'default_settings'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Default Settings'")
    data_raw |= (field_value & 0x3) << 2
    # tuner_regions | Offset: 4, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_REGIONS(f.value) for f in nmea2000Message.fields if f.id == 'tuner_regions'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Tuner regions'")
    data_raw |= (field_value & 0xF) << 4
    # max_favorites | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'max_favorites'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Max favorites'")
    data_raw |= (field_value & 0xFF) << 8
    return data_raw


def is_fast_pgn_130581() -> bool:
    """Return True if PGN 130581 is a fast PGN."""
    return True
def decode_pgn_130581(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130581."""
    nmea2000Message = NMEA2000Message(130581, 'zoneConfigurationDeprecated', 'Zone Configuration (deprecated)')
    # first_zone_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    first_zone_id_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    first_zone_id = first_zone_id_raw * 1 if first_zone_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('first_zone_id', 'First zone ID', "First Zone in this PGN", '', first_zone_id, first_zone_id_raw))

    # zone_count | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_count_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    zone_count = zone_count_raw * 1 if zone_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone_count', 'Zone count', "Number of Zones in this PGN", '', zone_count, zone_count_raw))

    # total_zone_count | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    total_zone_count_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    total_zone_count = total_zone_count_raw * 1 if total_zone_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_zone_count', 'Total zone count', "Total Zones supported by this device", '', total_zone_count, total_zone_count_raw))

    # zone_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    zone_id_raw = (data_raw >> 24) & 0xFF
    zone_id = lookup_ENTERTAINMENT_ZONE(zone_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('zone_id', 'Zone ID', "", '', zone_id, zone_id_raw))


    return nmea2000Message

def encode_pgn_130581(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130581."""
    data_raw = 0
    # first_zone_id | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'first_zone_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'First zone ID'")
    data_raw |= (field_value & 0xFF) << 0
    # zone_count | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone count'")
    data_raw |= (field_value & 0xFF) << 8
    # total_zone_count | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_zone_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total zone count'")
    data_raw |= (field_value & 0xFF) << 16
    # zone_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_ZONE(f.value) for f in nmea2000Message.fields if f.id == 'zone_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone ID'")
    data_raw |= (field_value & 0xFF) << 24
    raise Exception ("PGN 130581 not supporting encoding for now as Zone name is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130582() -> bool:
    """Return True if PGN 130582 is a fast PGN."""
    return False
def decode_pgn_130582(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130582."""
    nmea2000Message = NMEA2000Message(130582, 'zoneVolume', 'Zone Volume')
    # zone_id | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    zone_id_raw = (data_raw >> 0) & 0xFF
    zone_id = lookup_ENTERTAINMENT_ZONE(zone_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('zone_id', 'Zone ID', "", '', zone_id, zone_id_raw))

    # volume | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    volume_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    volume = volume_raw * 1 if volume_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('volume', 'Volume', "", '%', volume, volume_raw))

    # volume_change | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    volume_change_raw = (data_raw >> 16) & 0x3
    volume_change = lookup_ENTERTAINMENT_VOLUME_CONTROL(volume_change_raw)
    nmea2000Message.fields.append(NMEA2000Field('volume_change', 'Volume change', "Write only", '', volume_change, volume_change_raw))

    # mute | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    mute_raw = (data_raw >> 18) & 0x3
    mute = lookup_YES_NO(mute_raw)
    nmea2000Message.fields.append(NMEA2000Field('mute', 'Mute', "", '', mute, mute_raw))

    # reserved_20 | Offset: 20, Length: 4, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_20_raw = (data_raw >> 20) & 0xF
    reserved_20 = reserved_20_raw * 1 if reserved_20_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_20', 'Reserved', "", '', reserved_20, reserved_20_raw))

    # channel | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    channel_raw = (data_raw >> 24) & 0xFF
    channel = lookup_ENTERTAINMENT_CHANNEL(channel_raw)
    nmea2000Message.fields.append(NMEA2000Field('channel', 'Channel', "", '', channel, channel_raw))

    # reserved_32 | Offset: 32, Length: 32, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_32_raw = (data_raw >> 32) & 0xFFFFFFFF
    reserved_32 = reserved_32_raw * 1 if reserved_32_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_32', 'Reserved', "", '', reserved_32, reserved_32_raw))

    return nmea2000Message

def encode_pgn_130582(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130582."""
    data_raw = 0
    # zone_id | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_ZONE(f.value) for f in nmea2000Message.fields if f.id == 'zone_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone ID'")
    data_raw |= (field_value & 0xFF) << 0
    # volume | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'volume'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Volume'")
    data_raw |= (field_value & 0xFF) << 8
    # volume_change | Offset: 16, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_VOLUME_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'volume_change'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Volume change'")
    data_raw |= (field_value & 0x3) << 16
    # mute | Offset: 18, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'mute'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mute'")
    data_raw |= (field_value & 0x3) << 18
    # reserved_20 | Offset: 20, Length: 4, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_20'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xF) << 20
    # channel | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_CHANNEL(f.value) for f in nmea2000Message.fields if f.id == 'channel'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Channel'")
    data_raw |= (field_value & 0xFF) << 24
    # reserved_32 | Offset: 32, Length: 32, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_32'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFFFF) << 32
    return data_raw


def is_fast_pgn_130583() -> bool:
    """Return True if PGN 130583 is a fast PGN."""
    return True
def decode_pgn_130583(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130583."""
    nmea2000Message = NMEA2000Message(130583, 'availableAudioEqPresets', 'Available Audio EQ presets')
    # first_preset | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    first_preset_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    first_preset = first_preset_raw * 1 if first_preset_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('first_preset', 'First preset', "First preset in this PGN", '', first_preset, first_preset_raw))

    # preset_count | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    preset_count_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    preset_count = preset_count_raw * 1 if preset_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('preset_count', 'Preset count', "", '', preset_count, preset_count_raw))

    # total_preset_count | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    total_preset_count_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    total_preset_count = total_preset_count_raw * 1 if total_preset_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_preset_count', 'Total preset count', "", '', total_preset_count, total_preset_count_raw))

    # preset_type | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    preset_type_raw = (data_raw >> 24) & 0xFF
    preset_type = lookup_ENTERTAINMENT_EQ(preset_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('preset_type', 'Preset type', "", '', preset_type, preset_type_raw))


    return nmea2000Message

def encode_pgn_130583(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130583."""
    data_raw = 0
    # first_preset | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'first_preset'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'First preset'")
    data_raw |= (field_value & 0xFF) << 0
    # preset_count | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'preset_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Preset count'")
    data_raw |= (field_value & 0xFF) << 8
    # total_preset_count | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_preset_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total preset count'")
    data_raw |= (field_value & 0xFF) << 16
    # preset_type | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_EQ(f.value) for f in nmea2000Message.fields if f.id == 'preset_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Preset type'")
    data_raw |= (field_value & 0xFF) << 24
    raise Exception ("PGN 130583 not supporting encoding for now as Preset name is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130584() -> bool:
    """Return True if PGN 130584 is a fast PGN."""
    return True
def decode_pgn_130584(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130584."""
    nmea2000Message = NMEA2000Message(130584, 'availableBluetoothAddresses', 'Available Bluetooth addresses')
    # first_address | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    first_address_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    first_address = first_address_raw * 1 if first_address_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('first_address', 'First address', "First address in this PGN", '', first_address, first_address_raw))

    # address_count | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    address_count_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    address_count = address_count_raw * 1 if address_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('address_count', 'Address count', "", '', address_count, address_count_raw))

    # total_address_count | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    total_address_count_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    total_address_count = total_address_count_raw * 1 if total_address_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('total_address_count', 'Total address count', "", '', total_address_count, total_address_count_raw))

    # bluetooth_address | Offset: 24, Length: 48, Resolution: 1, Field Type: BINARY, Match: 
    bluetooth_address_raw = (data_raw >> 24) & 0xFFFFFFFFFFFF
    bluetooth_address = bluetooth_address_raw * 1 if bluetooth_address_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('bluetooth_address', 'Bluetooth address', "", '', bluetooth_address, bluetooth_address_raw))

    # status | Offset: 72, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    status_raw = (data_raw >> 72) & 0xFF
    status = lookup_BLUETOOTH_STATUS(status_raw)
    nmea2000Message.fields.append(NMEA2000Field('status', 'Status', "", '', status, status_raw))



    return nmea2000Message

def encode_pgn_130584(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130584."""
    data_raw = 0
    # first_address | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'first_address'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'First address'")
    data_raw |= (field_value & 0xFF) << 0
    # address_count | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'address_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Address count'")
    data_raw |= (field_value & 0xFF) << 8
    # total_address_count | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'total_address_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Total address count'")
    data_raw |= (field_value & 0xFF) << 16
    # bluetooth_address | Offset: 24, Length: 48, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'bluetooth_address'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Bluetooth address'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 24
    # status | Offset: 72, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_BLUETOOTH_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Status'")
    data_raw |= (field_value & 0xFF) << 72
    raise Exception ("PGN 130584 not supporting encoding for now as Device name is missing BitLength or BitOffset")
    raise Exception ("PGN 130584 not supporting encoding for now as Signal strength is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130585() -> bool:
    """Return True if PGN 130585 is a fast PGN."""
    return False
def decode_pgn_130585(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130585."""
    nmea2000Message = NMEA2000Message(130585, 'bluetoothSourceStatus', 'Bluetooth source status')
    # source_number | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    source_number_raw = decode_number((data_raw >> 0) & 0xFF, 8)
    source_number = source_number_raw * 1 if source_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_number', 'Source number', "", '', source_number, source_number_raw))

    # status | Offset: 8, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    status_raw = (data_raw >> 8) & 0xF
    status = lookup_BLUETOOTH_SOURCE_STATUS(status_raw)
    nmea2000Message.fields.append(NMEA2000Field('status', 'Status', "", '', status, status_raw))

    # forget_device | Offset: 12, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    forget_device_raw = (data_raw >> 12) & 0x3
    forget_device = lookup_YES_NO(forget_device_raw)
    nmea2000Message.fields.append(NMEA2000Field('forget_device', 'Forget device', "", '', forget_device, forget_device_raw))

    # discovering | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    discovering_raw = (data_raw >> 14) & 0x3
    discovering = lookup_YES_NO(discovering_raw)
    nmea2000Message.fields.append(NMEA2000Field('discovering', 'Discovering', "", '', discovering, discovering_raw))

    # bluetooth_address | Offset: 16, Length: 48, Resolution: 1, Field Type: BINARY, Match: 
    bluetooth_address_raw = (data_raw >> 16) & 0xFFFFFFFFFFFF
    bluetooth_address = bluetooth_address_raw * 1 if bluetooth_address_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('bluetooth_address', 'Bluetooth address', "", '', bluetooth_address, bluetooth_address_raw))

    return nmea2000Message

def encode_pgn_130585(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130585."""
    data_raw = 0
    # source_number | Offset: 0, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source number'")
    data_raw |= (field_value & 0xFF) << 0
    # status | Offset: 8, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_BLUETOOTH_SOURCE_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Status'")
    data_raw |= (field_value & 0xF) << 8
    # forget_device | Offset: 12, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'forget_device'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Forget device'")
    data_raw |= (field_value & 0x3) << 12
    # discovering | Offset: 14, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'discovering'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Discovering'")
    data_raw |= (field_value & 0x3) << 14
    # bluetooth_address | Offset: 16, Length: 48, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'bluetooth_address'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Bluetooth address'")
    data_raw |= (field_value & 0xFFFFFFFFFFFF) << 16
    return data_raw


def is_fast_pgn_130586() -> bool:
    """Return True if PGN 130586 is a fast PGN."""
    return True
def decode_pgn_130586(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130586."""
    nmea2000Message = NMEA2000Message(130586, 'zoneConfiguration', 'Zone Configuration')
    # zone_id | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    zone_id_raw = (data_raw >> 0) & 0xFF
    zone_id = lookup_ENTERTAINMENT_ZONE(zone_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('zone_id', 'Zone ID', "", '', zone_id, zone_id_raw))

    # volume_limit | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    volume_limit_raw = decode_number((data_raw >> 8) & 0xFF, 8)
    volume_limit = volume_limit_raw * 1 if volume_limit_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('volume_limit', 'Volume limit', "", '%', volume_limit, volume_limit_raw))

    # fade | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    fade_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    if fade_raw is not None and fade_raw & (1 << (8 - 1)):
        fade_raw -= (1 << 8)
    fade = fade_raw * 1 if fade_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('fade', 'Fade', "", '%', fade, fade_raw))

    # balance | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    balance_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    if balance_raw is not None and balance_raw & (1 << (8 - 1)):
        balance_raw -= (1 << 8)
    balance = balance_raw * 1 if balance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('balance', 'Balance', "", '%', balance, balance_raw))

    # sub_volume | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sub_volume_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    sub_volume = sub_volume_raw * 1 if sub_volume_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sub_volume', 'Sub volume', "", '%', sub_volume, sub_volume_raw))

    # eq___treble | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    eq___treble_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    if eq___treble_raw is not None and eq___treble_raw & (1 << (8 - 1)):
        eq___treble_raw -= (1 << 8)
    eq___treble = eq___treble_raw * 1 if eq___treble_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('eq___treble', 'EQ - Treble', "", '%', eq___treble, eq___treble_raw))

    # eq___mid_range | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    eq___mid_range_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    if eq___mid_range_raw is not None and eq___mid_range_raw & (1 << (8 - 1)):
        eq___mid_range_raw -= (1 << 8)
    eq___mid_range = eq___mid_range_raw * 1 if eq___mid_range_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('eq___mid_range', 'EQ - Mid range', "", '%', eq___mid_range, eq___mid_range_raw))

    # eq___bass | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    eq___bass_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    if eq___bass_raw is not None and eq___bass_raw & (1 << (8 - 1)):
        eq___bass_raw -= (1 << 8)
    eq___bass = eq___bass_raw * 1 if eq___bass_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('eq___bass', 'EQ - Bass', "", '%', eq___bass, eq___bass_raw))

    # preset_type | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    preset_type_raw = (data_raw >> 64) & 0xFF
    preset_type = lookup_ENTERTAINMENT_EQ(preset_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('preset_type', 'Preset type', "", '', preset_type, preset_type_raw))

    # audio_filter | Offset: 72, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    audio_filter_raw = (data_raw >> 72) & 0xFF
    audio_filter = lookup_ENTERTAINMENT_FILTER(audio_filter_raw)
    nmea2000Message.fields.append(NMEA2000Field('audio_filter', 'Audio filter', "", '', audio_filter, audio_filter_raw))

    # high_pass_filter_frequency | Offset: 80, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    high_pass_filter_frequency_raw = decode_number((data_raw >> 80) & 0xFFFF, 16)
    high_pass_filter_frequency = high_pass_filter_frequency_raw * 1 if high_pass_filter_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('high_pass_filter_frequency', 'High pass filter frequency', "", 'Hz', high_pass_filter_frequency, high_pass_filter_frequency_raw))

    # low_pass_filter_frequency | Offset: 96, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    low_pass_filter_frequency_raw = decode_number((data_raw >> 96) & 0xFFFF, 16)
    low_pass_filter_frequency = low_pass_filter_frequency_raw * 1 if low_pass_filter_frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('low_pass_filter_frequency', 'Low pass filter frequency', "", 'Hz', low_pass_filter_frequency, low_pass_filter_frequency_raw))

    # channel | Offset: 112, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    channel_raw = (data_raw >> 112) & 0xFF
    channel = lookup_ENTERTAINMENT_CHANNEL(channel_raw)
    nmea2000Message.fields.append(NMEA2000Field('channel', 'Channel', "", '', channel, channel_raw))

    return nmea2000Message

def encode_pgn_130586(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130586."""
    data_raw = 0
    # zone_id | Offset: 0, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_ZONE(f.value) for f in nmea2000Message.fields if f.id == 'zone_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone ID'")
    data_raw |= (field_value & 0xFF) << 0
    # volume_limit | Offset: 8, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'volume_limit'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Volume limit'")
    data_raw |= (field_value & 0xFF) << 8
    # fade | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'fade'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Fade'")
    data_raw |= (field_value & 0xFF) << 16
    # balance | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'balance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Balance'")
    data_raw |= (field_value & 0xFF) << 24
    # sub_volume | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sub_volume'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sub volume'")
    data_raw |= (field_value & 0xFF) << 32
    # eq___treble | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'eq___treble'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'EQ - Treble'")
    data_raw |= (field_value & 0xFF) << 40
    # eq___mid_range | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'eq___mid_range'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'EQ - Mid range'")
    data_raw |= (field_value & 0xFF) << 48
    # eq___bass | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'eq___bass'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'EQ - Bass'")
    data_raw |= (field_value & 0xFF) << 56
    # preset_type | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_EQ(f.value) for f in nmea2000Message.fields if f.id == 'preset_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Preset type'")
    data_raw |= (field_value & 0xFF) << 64
    # audio_filter | Offset: 72, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_FILTER(f.value) for f in nmea2000Message.fields if f.id == 'audio_filter'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Audio filter'")
    data_raw |= (field_value & 0xFF) << 72
    # high_pass_filter_frequency | Offset: 80, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'high_pass_filter_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'High pass filter frequency'")
    data_raw |= (field_value & 0xFFFF) << 80
    # low_pass_filter_frequency | Offset: 96, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'low_pass_filter_frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Low pass filter frequency'")
    data_raw |= (field_value & 0xFFFF) << 96
    # channel | Offset: 112, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_CHANNEL(f.value) for f in nmea2000Message.fields if f.id == 'channel'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Channel'")
    data_raw |= (field_value & 0xFF) << 112
    return data_raw


def is_fast_pgn_130816() -> bool:
    """Return True if PGN 130816 is a fast PGN."""
    return True
# Complex PGN. number of matches: 19
def decode_pgn_130816(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 1)
        ):
        return decode_pgn_130816_sonichubInit2(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 4)
        ):
        return decode_pgn_130816_sonichubAmRadio(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 5)
        ):
        return decode_pgn_130816_sonichubZoneInfo(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 6)
        ):
        return decode_pgn_130816_sonichubSource(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 8)
        ):
        return decode_pgn_130816_sonichubSourceList(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 9)
        ):
        return decode_pgn_130816_sonichubControl(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 12)
        ):
        return decode_pgn_130816_sonichubFmRadio(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 13)
        ):
        return decode_pgn_130816_sonichubPlaylist(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 14)
        ):
        return decode_pgn_130816_sonichubTrack(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 15)
        ):
        return decode_pgn_130816_sonichubArtist(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 16)
        ):
        return decode_pgn_130816_sonichubAlbum(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 19)
        ):
        return decode_pgn_130816_sonichubMenuItem(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 20)
        ):
        return decode_pgn_130816_sonichubZones(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 23)
        ):
        return decode_pgn_130816_sonichubMaxVolume(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 24)
        ):
        return decode_pgn_130816_sonichubVolume(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 25)
        ):
        return decode_pgn_130816_sonichubInit1(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 48)
        ):
        return decode_pgn_130816_sonichubPosition(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 50)
        ):
        return decode_pgn_130816_sonichubInit3(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 24) & 0xFF) == 50)
        ):
        return decode_pgn_130816_simradTextMessage(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_130816_sonichubInit2(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubInit2', 'SonicHub: Init #2')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 1
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Init #2", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # a | Offset: 40, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 56, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    return nmea2000Message

def encode_pgn_130816_sonichubInit2(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # a | Offset: 40, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFFFF) << 40
    # b | Offset: 56, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFFFF) << 56
    return data_raw

def decode_pgn_130816_sonichubAmRadio(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubAmRadio', 'SonicHub: AM Radio')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 4
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "AM Radio", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # item | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    item_raw = (data_raw >> 40) & 0xFF
    item = lookup_SONICHUB_TUNING(item_raw)
    nmea2000Message.fields.append(NMEA2000Field('item', 'Item', "", '', item, item_raw))

    # frequency | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    frequency_raw = decode_number((data_raw >> 48) & 0xFFFFFFFF, 32)
    frequency = frequency_raw * 1 if frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('frequency', 'Frequency', "", 'Hz', frequency, frequency_raw))

    # noise_level | Offset: 80, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    noise_level_raw = decode_number((data_raw >> 80) & 0x3, 2)
    noise_level = noise_level_raw * 1 if noise_level_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('noise_level', 'Noise level', "", '', noise_level, noise_level_raw))

    # signal_level | Offset: 82, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    signal_level_raw = decode_number((data_raw >> 82) & 0xF, 4)
    signal_level = signal_level_raw * 1 if signal_level_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('signal_level', 'Signal level', "", '', signal_level, signal_level_raw))

    # reserved_86 | Offset: 86, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_86_raw = (data_raw >> 86) & 0x3
    reserved_86 = reserved_86_raw * 1 if reserved_86_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_86', 'Reserved', "", '', reserved_86, reserved_86_raw))

    # text | Offset: 88, Length: 256, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130816_sonichubAmRadio(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # item | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_TUNING(f.value) for f in nmea2000Message.fields if f.id == 'item'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Item'")
    data_raw |= (field_value & 0xFF) << 40
    # frequency | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Frequency'")
    data_raw |= (field_value & 0xFFFFFFFF) << 48
    # noise_level | Offset: 80, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'noise_level'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Noise level'")
    data_raw |= (field_value & 0x3) << 80
    # signal_level | Offset: 82, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'signal_level'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Signal level'")
    data_raw |= (field_value & 0xF) << 82
    # reserved_86 | Offset: 86, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_86'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 86
    # text | Offset: 88, Length: 256, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Text'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 88
    return data_raw

def decode_pgn_130816_sonichubZoneInfo(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubZoneInfo', 'SonicHub: Zone info')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 5
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Zone Info", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # zone | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    zone = zone_raw * 1 if zone_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone', 'Zone', "", '', zone, zone_raw))

    return nmea2000Message

def encode_pgn_130816_sonichubZoneInfo(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # zone | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone'")
    data_raw |= (field_value & 0xFF) << 40
    return data_raw

def decode_pgn_130816_sonichubSource(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubSource', 'SonicHub: Source')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 6
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Source", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # source | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 40) & 0xFF
    source = lookup_SONICHUB_SOURCE(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    return nmea2000Message

def encode_pgn_130816_sonichubSource(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # source | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xFF) << 40
    return data_raw

def decode_pgn_130816_sonichubSourceList(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubSourceList', 'SonicHub: Source List')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 8
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Source List", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # source_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    source_id_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # a | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # text | Offset: 56, Length: 256, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130816_sonichubSourceList(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # source_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFF) << 40
    # a | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 48
    # text | Offset: 56, Length: 256, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Text'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 56
    return data_raw

def decode_pgn_130816_sonichubControl(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubControl', 'SonicHub: Control')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 9
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Control", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # item | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    item_raw = (data_raw >> 40) & 0xFF
    item = lookup_FUSION_MUTE_COMMAND(item_raw)
    nmea2000Message.fields.append(NMEA2000Field('item', 'Item', "", '', item, item_raw))

    return nmea2000Message

def encode_pgn_130816_sonichubControl(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # item | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MUTE_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'item'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Item'")
    data_raw |= (field_value & 0xFF) << 40
    return data_raw

def decode_pgn_130816_sonichubFmRadio(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubFmRadio', 'SonicHub: FM Radio')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 12
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "FM Radio", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # item | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    item_raw = (data_raw >> 40) & 0xFF
    item = lookup_SONICHUB_TUNING(item_raw)
    nmea2000Message.fields.append(NMEA2000Field('item', 'Item', "", '', item, item_raw))

    # frequency | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    frequency_raw = decode_number((data_raw >> 48) & 0xFFFFFFFF, 32)
    frequency = frequency_raw * 1 if frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('frequency', 'Frequency', "", 'Hz', frequency, frequency_raw))

    # noise_level | Offset: 80, Length: 2, Resolution: 1, Field Type: NUMBER, Match: 
    noise_level_raw = decode_number((data_raw >> 80) & 0x3, 2)
    noise_level = noise_level_raw * 1 if noise_level_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('noise_level', 'Noise level', "", '', noise_level, noise_level_raw))

    # signal_level | Offset: 82, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    signal_level_raw = decode_number((data_raw >> 82) & 0xF, 4)
    signal_level = signal_level_raw * 1 if signal_level_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('signal_level', 'Signal level', "", '', signal_level, signal_level_raw))

    # reserved_86 | Offset: 86, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_86_raw = (data_raw >> 86) & 0x3
    reserved_86 = reserved_86_raw * 1 if reserved_86_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_86', 'Reserved', "", '', reserved_86, reserved_86_raw))

    # text | Offset: 88, Length: 256, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130816_sonichubFmRadio(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # item | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_TUNING(f.value) for f in nmea2000Message.fields if f.id == 'item'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Item'")
    data_raw |= (field_value & 0xFF) << 40
    # frequency | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Frequency'")
    data_raw |= (field_value & 0xFFFFFFFF) << 48
    # noise_level | Offset: 80, Length: 2, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'noise_level'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Noise level'")
    data_raw |= (field_value & 0x3) << 80
    # signal_level | Offset: 82, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'signal_level'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Signal level'")
    data_raw |= (field_value & 0xF) << 82
    # reserved_86 | Offset: 86, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_86'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 86
    # text | Offset: 88, Length: 256, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Text'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 88
    return data_raw

def decode_pgn_130816_sonichubPlaylist(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubPlaylist', 'SonicHub: Playlist')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 13
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Playlist", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # item | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    item_raw = (data_raw >> 40) & 0xFF
    item = lookup_SONICHUB_PLAYLIST(item_raw)
    nmea2000Message.fields.append(NMEA2000Field('item', 'Item', "", '', item, item_raw))

    # a | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # current_track | Offset: 56, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    current_track_raw = decode_number((data_raw >> 56) & 0xFFFFFFFF, 32)
    current_track = current_track_raw * 1 if current_track_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('current_track', 'Current Track', "", '', current_track, current_track_raw))

    # tracks | Offset: 88, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    tracks_raw = decode_number((data_raw >> 88) & 0xFFFFFFFF, 32)
    tracks = tracks_raw * 1 if tracks_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('tracks', 'Tracks', "", '', tracks, tracks_raw))

    # length | Offset: 120, Length: 32, Resolution: 0.001, Field Type: TIME, Match: 
    length_raw = (data_raw >> 120) & 0xFFFFFFFF
    length = decode_time(length_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('length', 'Length', "", 's', length, length_raw))

    # position_in_track | Offset: 152, Length: 32, Resolution: 0.001, Field Type: TIME, Match: 
    position_in_track_raw = (data_raw >> 152) & 0xFFFFFFFF
    position_in_track = decode_time(position_in_track_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('position_in_track', 'Position in track', "", 's', position_in_track, position_in_track_raw))

    return nmea2000Message

def encode_pgn_130816_sonichubPlaylist(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # item | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_PLAYLIST(f.value) for f in nmea2000Message.fields if f.id == 'item'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Item'")
    data_raw |= (field_value & 0xFF) << 40
    # a | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 48
    # current_track | Offset: 56, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'current_track'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Current Track'")
    data_raw |= (field_value & 0xFFFFFFFF) << 56
    # tracks | Offset: 88, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'tracks'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Tracks'")
    data_raw |= (field_value & 0xFFFFFFFF) << 88
    # length | Offset: 120, Length: 32, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'length'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Length'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFFFF) << 120
    
    # position_in_track | Offset: 152, Length: 32, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_in_track'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position in track'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFFFF) << 152
    
    return data_raw

def decode_pgn_130816_sonichubTrack(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubTrack', 'SonicHub: Track')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 14
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Track", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # item | Offset: 40, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    item_raw = decode_number((data_raw >> 40) & 0xFFFFFFFF, 32)
    item = item_raw * 1 if item_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('item', 'Item', "", '', item, item_raw))

    # text | Offset: 72, Length: 256, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130816_sonichubTrack(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # item | Offset: 40, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'item'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Item'")
    data_raw |= (field_value & 0xFFFFFFFF) << 40
    # text | Offset: 72, Length: 256, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Text'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 72
    return data_raw

def decode_pgn_130816_sonichubArtist(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubArtist', 'SonicHub: Artist')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 15
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Artist", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # item | Offset: 40, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    item_raw = decode_number((data_raw >> 40) & 0xFFFFFFFF, 32)
    item = item_raw * 1 if item_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('item', 'Item', "", '', item, item_raw))

    # text | Offset: 72, Length: 256, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130816_sonichubArtist(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # item | Offset: 40, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'item'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Item'")
    data_raw |= (field_value & 0xFFFFFFFF) << 40
    # text | Offset: 72, Length: 256, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Text'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 72
    return data_raw

def decode_pgn_130816_sonichubAlbum(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubAlbum', 'SonicHub: Album')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 16
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Album", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # item | Offset: 40, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    item_raw = decode_number((data_raw >> 40) & 0xFFFFFFFF, 32)
    item = item_raw * 1 if item_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('item', 'Item', "", '', item, item_raw))

    # text | Offset: 72, Length: 256, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130816_sonichubAlbum(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # item | Offset: 40, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'item'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Item'")
    data_raw |= (field_value & 0xFFFFFFFF) << 40
    # text | Offset: 72, Length: 256, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Text'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 72
    return data_raw

def decode_pgn_130816_sonichubMenuItem(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubMenuItem', 'SonicHub: Menu Item')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 19
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Menu Item", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # item | Offset: 40, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    item_raw = decode_number((data_raw >> 40) & 0xFFFFFFFF, 32)
    item = item_raw * 1 if item_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('item', 'Item', "", '', item, item_raw))

    # c | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 72) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # d | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 80) & 0xFF, 8)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    # e | Offset: 88, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 88) & 0xFF, 8)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    # text | Offset: 96, Length: 256, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130816_sonichubMenuItem(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # item | Offset: 40, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'item'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Item'")
    data_raw |= (field_value & 0xFFFFFFFF) << 40
    # c | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 72
    # d | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFF) << 80
    # e | Offset: 88, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFF) << 88
    # text | Offset: 96, Length: 256, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Text'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 96
    return data_raw

def decode_pgn_130816_sonichubZones(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubZones', 'SonicHub: Zones')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 20
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Zones", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # zones | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zones_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    zones = zones_raw * 1 if zones_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zones', 'Zones', "", '', zones, zones_raw))

    return nmea2000Message

def encode_pgn_130816_sonichubZones(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # zones | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zones'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zones'")
    data_raw |= (field_value & 0xFF) << 40
    return data_raw

def decode_pgn_130816_sonichubMaxVolume(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubMaxVolume', 'SonicHub: Max Volume')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 23
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Max Volume", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # zone | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    zone = zone_raw * 1 if zone_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone', 'Zone', "", '', zone, zone_raw))

    # level | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    level_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    level = level_raw * 1 if level_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('level', 'Level', "", '', level, level_raw))

    return nmea2000Message

def encode_pgn_130816_sonichubMaxVolume(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # zone | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone'")
    data_raw |= (field_value & 0xFF) << 40
    # level | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'level'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Level'")
    data_raw |= (field_value & 0xFF) << 48
    return data_raw

def decode_pgn_130816_sonichubVolume(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubVolume', 'SonicHub: Volume')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 24
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Volume", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # zone | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    zone = zone_raw * 1 if zone_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone', 'Zone', "", '', zone, zone_raw))

    # level | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    level_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    level = level_raw * 1 if level_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('level', 'Level', "", '', level, level_raw))

    return nmea2000Message

def encode_pgn_130816_sonichubVolume(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # zone | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone'")
    data_raw |= (field_value & 0xFF) << 40
    # level | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'level'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Level'")
    data_raw |= (field_value & 0xFF) << 48
    return data_raw

def decode_pgn_130816_sonichubInit1(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubInit1', 'SonicHub: Init #1')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 25
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Init #1", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    return nmea2000Message

def encode_pgn_130816_sonichubInit1(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    return data_raw

def decode_pgn_130816_sonichubPosition(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubPosition', 'SonicHub: Position')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 48
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Position", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # position | Offset: 40, Length: 32, Resolution: 0.001, Field Type: TIME, Match: 
    position_raw = (data_raw >> 40) & 0xFFFFFFFF
    position = decode_time(position_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('position', 'Position', "", 's', position, position_raw))

    return nmea2000Message

def encode_pgn_130816_sonichubPosition(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # position | Offset: 40, Length: 32, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFFFF) << 40
    
    return data_raw

def decode_pgn_130816_sonichubInit3(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'sonichubInit3', 'SonicHub: Init #3')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 50
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SONICHUB_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Init #3", '', proprietary_id, proprietary_id_raw))

    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 32) & 0xFF
    control = lookup_SONICHUB_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # a | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    return nmea2000Message

def encode_pgn_130816_sonichubInit3(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # control | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SONICHUB_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0xFF) << 32
    # a | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 40
    # b | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 48
    return data_raw

def decode_pgn_130816_simradTextMessage(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130816."""
    nmea2000Message = NMEA2000Message(130816, 'simradTextMessage', 'Simrad: Text Message')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 50
    proprietary_id_raw = (data_raw >> 24) & 0xFF
    proprietary_id = lookup_SIMNET_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Text", '', proprietary_id, proprietary_id_raw))

    # a | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # c | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # sid | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # prio | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    prio_raw = decode_number((data_raw >> 64) & 0xFF, 8)
    prio = prio_raw * 1 if prio_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('prio', 'Prio', "", '', prio, prio_raw))

    # text | Offset: 72, Length: 256, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130816_simradTextMessage(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130816."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # proprietary_id | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 24
    # a | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 32
    # b | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 40
    # c | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 48
    # sid | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 56
    # prio | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'prio'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Prio'")
    data_raw |= (field_value & 0xFF) << 64
    # text | Offset: 72, Length: 256, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Text'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 72
    return data_raw


def is_fast_pgn_130817() -> bool:
    """Return True if PGN 130817 is a fast PGN."""
    return True
# Complex PGN. number of matches: 2
def decode_pgn_130817(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130817_navicoProductInformation(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 140) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130817_lowranceProductInformation(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_130817_navicoProductInformation(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130817."""
    nmea2000Message = NMEA2000Message(130817, 'navicoProductInformation', 'Navico: Product Information')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # product_code | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    product_code_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    product_code = product_code_raw * 1 if product_code_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('product_code', 'Product Code', "", '', product_code, product_code_raw))

    # model | Offset: 32, Length: 256, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # a | Offset: 288, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 288) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 296, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 296) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # c | Offset: 304, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 304) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # firmware_version | Offset: 312, Length: 80, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # firmware_date | Offset: 392, Length: 256, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # firmware_time | Offset: 648, Length: 256, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130817_navicoProductInformation(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130817."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # product_code | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'product_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Product Code'")
    data_raw |= (field_value & 0xFFFF) << 16
    # model | Offset: 32, Length: 256, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Model'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 32
    # a | Offset: 288, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 288
    # b | Offset: 296, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 296
    # c | Offset: 304, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 304
    # firmware_version | Offset: 312, Length: 80, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Firmware version'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFF) << 312
    # firmware_date | Offset: 392, Length: 256, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Firmware date'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 392
    # firmware_time | Offset: 648, Length: 256, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Firmware time'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 648
    return data_raw

def decode_pgn_130817_lowranceProductInformation(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130817."""
    nmea2000Message = NMEA2000Message(130817, 'lowranceProductInformation', 'Lowrance: Product Information')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 140
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Lowrance", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # product_code | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    product_code_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    product_code = product_code_raw * 1 if product_code_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('product_code', 'Product Code', "", '', product_code, product_code_raw))

    # model | Offset: 32, Length: 256, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # a | Offset: 288, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 288) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 296, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 296) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # c | Offset: 304, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 304) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # firmware_version | Offset: 312, Length: 80, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # firmware_date | Offset: 392, Length: 256, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # firmware_time | Offset: 648, Length: 256, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130817_lowranceProductInformation(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130817."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # product_code | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'product_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Product Code'")
    data_raw |= (field_value & 0xFFFF) << 16
    # model | Offset: 32, Length: 256, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Model'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 32
    # a | Offset: 288, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 288
    # b | Offset: 296, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 296
    # c | Offset: 304, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 304
    # firmware_version | Offset: 312, Length: 80, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Firmware version'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFF) << 312
    # firmware_date | Offset: 392, Length: 256, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Firmware date'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 392
    # firmware_time | Offset: 648, Length: 256, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Firmware time'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 648
    return data_raw


def is_fast_pgn_130818() -> bool:
    """Return True if PGN 130818 is a fast PGN."""
    return True
def decode_pgn_130818(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130818."""
    nmea2000Message = NMEA2000Message(130818, 'simnetReprogramData', 'Simnet: Reprogram Data')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # version | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    version_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    version = version_raw * 1 if version_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('version', 'Version', "", '', version, version_raw))

    # sequence | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    sequence_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    sequence = sequence_raw * 1 if sequence_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sequence', 'Sequence', "", '', sequence, sequence_raw))

    # data | Offset: 48, Length: 1736, Resolution: 1, Field Type: BINARY
    # Skipping fields longer than 256

    return nmea2000Message

def encode_pgn_130818(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130818."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # version | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'version'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Version'")
    data_raw |= (field_value & 0xFFFF) << 16
    # sequence | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sequence'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Sequence'")
    data_raw |= (field_value & 0xFFFF) << 32
    # data | Offset: 48, Length: 1736, Resolution: 1, Field Type: BINARY
    # Skipping fields longer than 256
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 48
    return data_raw


def is_fast_pgn_130819() -> bool:
    """Return True if PGN 130819 is a fast PGN."""
    return True
def decode_pgn_130819(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130819."""
    nmea2000Message = NMEA2000Message(130819, 'simnetRequestReprogram', 'Simnet: Request Reprogram')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    return nmea2000Message

def encode_pgn_130819(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130819."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    return data_raw


def is_fast_pgn_130820() -> bool:
    """Return True if PGN 130820 is a fast PGN."""
    return True
# Complex PGN. number of matches: 25
def decode_pgn_130820(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130820_simnetReprogramStatus(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1855) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130820_furunoUnknown130820(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 2)
        ):
        return decode_pgn_130820_fusionSourceName(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 4)
        ):
        return decode_pgn_130820_fusionTrackInfo(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 5)
        ):
        return decode_pgn_130820_fusionTrack(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 6)
        ):
        return decode_pgn_130820_fusionArtist(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 7)
        ):
        return decode_pgn_130820_fusionAlbum(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 33)
        ):
        return decode_pgn_130820_fusionUnitName(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 45)
        ):
        return decode_pgn_130820_fusionZoneName(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 9)
        ):
        return decode_pgn_130820_fusionPlayProgress(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 11)
        ):
        return decode_pgn_130820_fusionAmFmStation(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 12)
        ):
        return decode_pgn_130820_fusionVhf(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 13)
        ):
        return decode_pgn_130820_fusionSquelch(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 14)
        ):
        return decode_pgn_130820_fusionScan(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 17)
        ):
        return decode_pgn_130820_fusionMenuItem(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 20)
        ):
        return decode_pgn_130820_fusionReplay(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 23)
        ):
        return decode_pgn_130820_fusionMute(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 26)
        ):
        return decode_pgn_130820_fusionSubVolume(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 27)
        ):
        return decode_pgn_130820_fusionTone(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 29)
        ):
        return decode_pgn_130820_fusionVolume(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 32)
        ):
        return decode_pgn_130820_fusionPowerState(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 36)
        ):
        return decode_pgn_130820_fusionSiriusxmChannel(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 37)
        ):
        return decode_pgn_130820_fusionSiriusxmTitle(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 38)
        ):
        return decode_pgn_130820_fusionSiriusxmArtist(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 419) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 40)
        ):
        return decode_pgn_130820_fusionSiriusxmGenre(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_130820_simnetReprogramStatus(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'simnetReprogramStatus', 'Simnet: Reprogram Status')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_16_raw = (data_raw >> 16) & 0xFF
    reserved_16 = reserved_16_raw * 1 if reserved_16_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_16', 'Reserved', "", '', reserved_16, reserved_16_raw))

    # status | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    status_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    status = status_raw * 1 if status_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('status', 'Status', "", '', status, status_raw))

    # reserved_32 | Offset: 32, Length: 24, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_32_raw = (data_raw >> 32) & 0xFFFFFF
    reserved_32 = reserved_32_raw * 1 if reserved_32_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_32', 'Reserved', "", '', reserved_32, reserved_32_raw))

    return nmea2000Message

def encode_pgn_130820_simnetReprogramStatus(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # reserved_16 | Offset: 16, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_16'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 16
    # status | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Status'")
    data_raw |= (field_value & 0xFF) << 24
    # reserved_32 | Offset: 32, Length: 24, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_32'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFFFFFF) << 32
    return data_raw

def decode_pgn_130820_furunoUnknown130820(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'furunoUnknown130820', 'Furuno: Unknown 130820')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1855
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Furuno", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # c | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # d | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    # e | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    return nmea2000Message

def encode_pgn_130820_furunoUnknown130820(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 16
    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 24
    # c | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 32
    # d | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFF) << 40
    # e | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFF) << 48
    return data_raw

def decode_pgn_130820_fusionSourceName(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionSourceName', 'Fusion: Source Name')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 2
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Source", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # source_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    source_id_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    source_id = source_id_raw * 1 if source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('source_id', 'Source ID', "", '', source_id, source_id_raw))

    # current_source_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    current_source_id_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    current_source_id = current_source_id_raw * 1 if current_source_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('current_source_id', 'Current Source ID', "", '', current_source_id, current_source_id_raw))

    # d | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    # e | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    # source | Offset: 64, Length: 40, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130820_fusionSourceName(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # source_id | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source ID'")
    data_raw |= (field_value & 0xFF) << 32
    # current_source_id | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'current_source_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Current Source ID'")
    data_raw |= (field_value & 0xFF) << 40
    # d | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFF) << 48
    # e | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFF) << 56
    # source | Offset: 64, Length: 40, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xFFFFFFFFFF) << 64
    return data_raw

def decode_pgn_130820_fusionTrackInfo(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionTrackInfo', 'Fusion: Track Info')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 4
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Track Info", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # transport | Offset: 40, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    transport_raw = (data_raw >> 40) & 0xF
    transport = lookup_ENTERTAINMENT_PLAY_STATUS(transport_raw)
    nmea2000Message.fields.append(NMEA2000Field('transport', 'Transport', "", '', transport, transport_raw))

    # x | Offset: 44, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    x_raw = decode_number((data_raw >> 44) & 0xF, 4)
    x = x_raw * 1 if x_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('x', 'X', "", '', x, x_raw))

    # b | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # track__ | Offset: 56, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    track___raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    track__ = track___raw * 1 if track___raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('track__', 'Track #', "", '', track__, track___raw))

    # c | Offset: 72, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # track_count | Offset: 88, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    track_count_raw = decode_number((data_raw >> 88) & 0xFFFF, 16)
    track_count = track_count_raw * 1 if track_count_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('track_count', 'Track Count', "", '', track_count, track_count_raw))

    # e | Offset: 104, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 104) & 0xFFFF, 16)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    # length | Offset: 120, Length: 24, Resolution: 0.001, Field Type: TIME, Match: 
    length_raw = (data_raw >> 120) & 0xFFFFFF
    length = decode_time(length_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('length', 'Length', "", 's', length, length_raw))

    # position_in_track | Offset: 144, Length: 24, Resolution: 0.001, Field Type: TIME, Match: 
    position_in_track_raw = (data_raw >> 144) & 0xFFFFFF
    position_in_track = decode_time(position_in_track_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('position_in_track', 'Position in track', "", 's', position_in_track, position_in_track_raw))

    # h | Offset: 168, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    h_raw = decode_number((data_raw >> 168) & 0xFFFF, 16)
    h = h_raw * 1 if h_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('h', 'H', "", '', h, h_raw))

    return nmea2000Message

def encode_pgn_130820_fusionTrackInfo(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFFFF) << 24
    # transport | Offset: 40, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_ENTERTAINMENT_PLAY_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'transport'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Transport'")
    data_raw |= (field_value & 0xF) << 40
    # x | Offset: 44, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'x'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'X'")
    data_raw |= (field_value & 0xF) << 44
    # b | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 48
    # track__ | Offset: 56, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'track__'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Track #'")
    data_raw |= (field_value & 0xFFFF) << 56
    # c | Offset: 72, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFFFF) << 72
    # track_count | Offset: 88, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'track_count'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Track Count'")
    data_raw |= (field_value & 0xFFFF) << 88
    # e | Offset: 104, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFFFF) << 104
    # length | Offset: 120, Length: 24, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'length'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Length'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFF) << 120
    
    # position_in_track | Offset: 144, Length: 24, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_in_track'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position in track'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFF) << 144
    
    # h | Offset: 168, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'h'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'H'")
    data_raw |= (field_value & 0xFFFF) << 168
    return data_raw

def decode_pgn_130820_fusionTrack(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionTrack', 'Fusion: Track')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 5
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Track Title", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 32, Length: 40, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 32) & 0xFFFFFFFFFF, 40)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # track | Offset: 72, Length: 80, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130820_fusionTrack(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # b | Offset: 32, Length: 40, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFFFFFFFFFF) << 32
    # track | Offset: 72, Length: 80, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Track'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFF) << 72
    return data_raw

def decode_pgn_130820_fusionArtist(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionArtist', 'Fusion: Artist')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 6
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Track Artist", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 32, Length: 40, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 32) & 0xFFFFFFFFFF, 40)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # artist | Offset: 72, Length: 80, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130820_fusionArtist(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # b | Offset: 32, Length: 40, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFFFFFFFFFF) << 32
    # artist | Offset: 72, Length: 80, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Artist'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFF) << 72
    return data_raw

def decode_pgn_130820_fusionAlbum(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionAlbum', 'Fusion: Album')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 7
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Track Album", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 32, Length: 40, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 32) & 0xFFFFFFFFFF, 40)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # album | Offset: 72, Length: 80, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130820_fusionAlbum(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # b | Offset: 32, Length: 40, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFFFFFFFFFF) << 32
    # album | Offset: 72, Length: 80, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Album'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFF) << 72
    return data_raw

def decode_pgn_130820_fusionUnitName(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionUnitName', 'Fusion: Unit Name')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 33
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Unit Name", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # name | Offset: 32, Length: 112, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130820_fusionUnitName(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # name | Offset: 32, Length: 112, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Name'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 32
    return data_raw

def decode_pgn_130820_fusionZoneName(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionZoneName', 'Fusion: Zone Name')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 45
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Zone Name", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # number | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    number = number_raw * 1 if number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number', 'Number', "", '', number, number_raw))

    # name | Offset: 40, Length: 104, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130820_fusionZoneName(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # number | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number'")
    data_raw |= (field_value & 0xFF) << 32
    # name | Offset: 40, Length: 104, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Name'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFF) << 40
    return data_raw

def decode_pgn_130820_fusionPlayProgress(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionPlayProgress', 'Fusion: Play Progress')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 9
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Track Progress", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # progress | Offset: 40, Length: 24, Resolution: 0.001, Field Type: TIME, Match: 
    progress_raw = (data_raw >> 40) & 0xFFFFFF
    progress = decode_time(progress_raw * 0.001)
    nmea2000Message.fields.append(NMEA2000Field('progress', 'Progress', "", 's', progress, progress_raw))

    return nmea2000Message

def encode_pgn_130820_fusionPlayProgress(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 32
    # progress | Offset: 40, Length: 24, Resolution: 0.001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'progress'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Progress'")        
    data_raw |= (int(field_value / 0.001) & 0xFFFFFF) << 40
    
    return data_raw

def decode_pgn_130820_fusionAmFmStation(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionAmFmStation', 'Fusion: AM/FM Station')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 11
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "AM/FM Station", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # am_fm | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    am_fm_raw = (data_raw >> 32) & 0xFF
    am_fm = lookup_FUSION_RADIO_SOURCE(am_fm_raw)
    nmea2000Message.fields.append(NMEA2000Field('am_fm', 'AM/FM', "", '', am_fm, am_fm_raw))

    # b | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # frequency | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    frequency_raw = decode_number((data_raw >> 48) & 0xFFFFFFFF, 32)
    frequency = frequency_raw * 1 if frequency_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('frequency', 'Frequency', "", 'Hz', frequency, frequency_raw))

    # c | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 80) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # track | Offset: 88, Length: 80, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130820_fusionAmFmStation(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # am_fm | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_RADIO_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'am_fm'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AM/FM'")
    data_raw |= (field_value & 0xFF) << 32
    # b | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 40
    # frequency | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'frequency'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Frequency'")
    data_raw |= (field_value & 0xFFFFFFFF) << 48
    # c | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 80
    # track | Offset: 88, Length: 80, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Track'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFF) << 88
    return data_raw

def decode_pgn_130820_fusionVhf(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionVhf', 'Fusion: VHF')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 12
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "VHF", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # channel | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    channel_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    channel = channel_raw * 1 if channel_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('channel', 'Channel', "", '', channel, channel_raw))

    # d | Offset: 48, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 48) & 0xFFFFFF, 24)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    return nmea2000Message

def encode_pgn_130820_fusionVhf(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 32
    # channel | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'channel'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Channel'")
    data_raw |= (field_value & 0xFF) << 40
    # d | Offset: 48, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFFFFFF) << 48
    return data_raw

def decode_pgn_130820_fusionSquelch(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionSquelch', 'Fusion: Squelch')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 13
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Squelch", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # squelch | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    squelch_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    squelch = squelch_raw * 1 if squelch_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('squelch', 'Squelch', "", '', squelch, squelch_raw))

    return nmea2000Message

def encode_pgn_130820_fusionSquelch(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 32
    # squelch | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'squelch'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Squelch'")
    data_raw |= (field_value & 0xFF) << 40
    return data_raw

def decode_pgn_130820_fusionScan(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionScan', 'Fusion: Scan')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 14
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Scan", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # scan | Offset: 40, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    scan_raw = (data_raw >> 40) & 0x3
    scan = lookup_YES_NO(scan_raw)
    nmea2000Message.fields.append(NMEA2000Field('scan', 'Scan', "", '', scan, scan_raw))

    # c | Offset: 42, Length: 6, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 42) & 0x3F, 6)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    return nmea2000Message

def encode_pgn_130820_fusionScan(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 32
    # scan | Offset: 40, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_YES_NO(f.value) for f in nmea2000Message.fields if f.id == 'scan'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Scan'")
    data_raw |= (field_value & 0x3) << 40
    # c | Offset: 42, Length: 6, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0x3F) << 42
    return data_raw

def decode_pgn_130820_fusionMenuItem(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionMenuItem', 'Fusion: Menu Item')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 17
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Menu Item", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # line | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    line_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    line = line_raw * 1 if line_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('line', 'Line', "", '', line, line_raw))

    # e | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    # f | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    f_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    f = f_raw * 1 if f_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('f', 'F', "", '', f, f_raw))

    # g | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    g_raw = decode_number((data_raw >> 64) & 0xFF, 8)
    g = g_raw * 1 if g_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('g', 'G', "", '', g, g_raw))

    # h | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    h_raw = decode_number((data_raw >> 72) & 0xFF, 8)
    h = h_raw * 1 if h_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('h', 'H', "", '', h, h_raw))

    # i | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    i_raw = decode_number((data_raw >> 80) & 0xFF, 8)
    i = i_raw * 1 if i_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('i', 'I', "", '', i, i_raw))

    # text | Offset: 88, Length: 40, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130820_fusionMenuItem(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 32
    # line | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'line'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Line'")
    data_raw |= (field_value & 0xFF) << 40
    # e | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFF) << 48
    # f | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'f'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'F'")
    data_raw |= (field_value & 0xFF) << 56
    # g | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'g'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'G'")
    data_raw |= (field_value & 0xFF) << 64
    # h | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'h'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'H'")
    data_raw |= (field_value & 0xFF) << 72
    # i | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'i'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'I'")
    data_raw |= (field_value & 0xFF) << 80
    # text | Offset: 88, Length: 40, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Text'")
    data_raw |= (field_value & 0xFFFFFFFFFF) << 88
    return data_raw

def decode_pgn_130820_fusionReplay(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionReplay', 'Fusion: Replay')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 20
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Replay", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # mode | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    mode_raw = (data_raw >> 32) & 0xFF
    mode = lookup_FUSION_REPLAY_MODE(mode_raw)
    nmea2000Message.fields.append(NMEA2000Field('mode', 'Mode', "", '', mode, mode_raw))

    # c | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 40) & 0xFFFFFF, 24)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # d | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 64) & 0xFF, 8)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    # e | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 72) & 0xFF, 8)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    # status | Offset: 80, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    status_raw = (data_raw >> 80) & 0xFF
    status = lookup_FUSION_REPLAY_STATUS(status_raw)
    nmea2000Message.fields.append(NMEA2000Field('status', 'Status', "", '', status, status_raw))

    # h | Offset: 88, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    h_raw = decode_number((data_raw >> 88) & 0xFF, 8)
    h = h_raw * 1 if h_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('h', 'H', "", '', h, h_raw))

    # i | Offset: 96, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    i_raw = decode_number((data_raw >> 96) & 0xFF, 8)
    i = i_raw * 1 if i_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('i', 'I', "", '', i, i_raw))

    # j | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    j_raw = decode_number((data_raw >> 104) & 0xFF, 8)
    j = j_raw * 1 if j_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('j', 'J', "", '', j, j_raw))

    return nmea2000Message

def encode_pgn_130820_fusionReplay(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # mode | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_REPLAY_MODE(f.value) for f in nmea2000Message.fields if f.id == 'mode'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mode'")
    data_raw |= (field_value & 0xFF) << 32
    # c | Offset: 40, Length: 24, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFFFFFF) << 40
    # d | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFF) << 64
    # e | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFF) << 72
    # status | Offset: 80, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_REPLAY_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Status'")
    data_raw |= (field_value & 0xFF) << 80
    # h | Offset: 88, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'h'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'H'")
    data_raw |= (field_value & 0xFF) << 88
    # i | Offset: 96, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'i'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'I'")
    data_raw |= (field_value & 0xFF) << 96
    # j | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'j'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'J'")
    data_raw |= (field_value & 0xFF) << 104
    return data_raw

def decode_pgn_130820_fusionMute(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionMute', 'Fusion: Mute')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 23
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Mute", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # mute | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    mute_raw = (data_raw >> 32) & 0xFF
    mute = lookup_FUSION_MUTE_COMMAND(mute_raw)
    nmea2000Message.fields.append(NMEA2000Field('mute', 'Mute', "", '', mute, mute_raw))

    return nmea2000Message

def encode_pgn_130820_fusionMute(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # mute | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MUTE_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'mute'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mute'")
    data_raw |= (field_value & 0xFF) << 32
    return data_raw

def decode_pgn_130820_fusionSubVolume(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionSubVolume', 'Fusion: Sub Volume')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 26
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Sub Volume", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # zone_1 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_1_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    zone_1 = zone_1_raw * 1 if zone_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone_1', 'Zone 1', "", '', zone_1, zone_1_raw))

    # zone_2 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_2_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    zone_2 = zone_2_raw * 1 if zone_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone_2', 'Zone 2', "", '', zone_2, zone_2_raw))

    # zone_3 | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_3_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    zone_3 = zone_3_raw * 1 if zone_3_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone_3', 'Zone 3', "", '', zone_3, zone_3_raw))

    # zone_4 | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_4_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    zone_4 = zone_4_raw * 1 if zone_4_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone_4', 'Zone 4', "", '', zone_4, zone_4_raw))

    return nmea2000Message

def encode_pgn_130820_fusionSubVolume(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # zone_1 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone 1'")
    data_raw |= (field_value & 0xFF) << 32
    # zone_2 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone 2'")
    data_raw |= (field_value & 0xFF) << 40
    # zone_3 | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone_3'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone 3'")
    data_raw |= (field_value & 0xFF) << 48
    # zone_4 | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone_4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone 4'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw

def decode_pgn_130820_fusionTone(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionTone', 'Fusion: Tone')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 27
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Tone", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # bass | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    bass_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    if bass_raw is not None and bass_raw & (1 << (8 - 1)):
        bass_raw -= (1 << 8)
    bass = bass_raw * 1 if bass_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('bass', 'Bass', "", '', bass, bass_raw))

    # mid | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    mid_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    if mid_raw is not None and mid_raw & (1 << (8 - 1)):
        mid_raw -= (1 << 8)
    mid = mid_raw * 1 if mid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('mid', 'Mid', "", '', mid, mid_raw))

    # treble | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    treble_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    if treble_raw is not None and treble_raw & (1 << (8 - 1)):
        treble_raw -= (1 << 8)
    treble = treble_raw * 1 if treble_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('treble', 'Treble', "", '', treble, treble_raw))

    return nmea2000Message

def encode_pgn_130820_fusionTone(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 32
    # bass | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'bass'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Bass'")
    data_raw |= (field_value & 0xFF) << 40
    # mid | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'mid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mid'")
    data_raw |= (field_value & 0xFF) << 48
    # treble | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'treble'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Treble'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw

def decode_pgn_130820_fusionVolume(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionVolume', 'Fusion: Volume')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 29
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Volume", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # zone_1 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_1_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    zone_1 = zone_1_raw * 1 if zone_1_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone_1', 'Zone 1', "", '', zone_1, zone_1_raw))

    # zone_2 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_2_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    zone_2 = zone_2_raw * 1 if zone_2_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone_2', 'Zone 2', "", '', zone_2, zone_2_raw))

    # zone_3 | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_3_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    zone_3 = zone_3_raw * 1 if zone_3_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone_3', 'Zone 3', "", '', zone_3, zone_3_raw))

    # zone_4 | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    zone_4_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    zone_4 = zone_4_raw * 1 if zone_4_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('zone_4', 'Zone 4', "", '', zone_4, zone_4_raw))

    return nmea2000Message

def encode_pgn_130820_fusionVolume(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # zone_1 | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone_1'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone 1'")
    data_raw |= (field_value & 0xFF) << 32
    # zone_2 | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone_2'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone 2'")
    data_raw |= (field_value & 0xFF) << 40
    # zone_3 | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone_3'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone 3'")
    data_raw |= (field_value & 0xFF) << 48
    # zone_4 | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'zone_4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Zone 4'")
    data_raw |= (field_value & 0xFF) << 56
    return data_raw

def decode_pgn_130820_fusionPowerState(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionPowerState', 'Fusion: Power State')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 32
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Power", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # state | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    state_raw = (data_raw >> 32) & 0xFF
    state = lookup_FUSION_POWER_STATE(state_raw)
    nmea2000Message.fields.append(NMEA2000Field('state', 'State', "", '', state, state_raw))

    return nmea2000Message

def encode_pgn_130820_fusionPowerState(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # state | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_POWER_STATE(f.value) for f in nmea2000Message.fields if f.id == 'state'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'State'")
    data_raw |= (field_value & 0xFF) << 32
    return data_raw

def decode_pgn_130820_fusionSiriusxmChannel(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionSiriusxmChannel', 'Fusion: SiriusXM Channel')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 36
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "SiriusXM Channel", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFFFFFFFF, 32)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # channel | Offset: 56, Length: 96, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130820_fusionSiriusxmChannel(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFFFFFFFF) << 24
    # channel | Offset: 56, Length: 96, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Channel'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFF) << 56
    return data_raw

def decode_pgn_130820_fusionSiriusxmTitle(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionSiriusxmTitle', 'Fusion: SiriusXM Title')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 37
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "SiriusXM Title", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFFFFFFFF, 32)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # title | Offset: 56, Length: 96, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130820_fusionSiriusxmTitle(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFFFFFFFF) << 24
    # title | Offset: 56, Length: 96, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Title'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFF) << 56
    return data_raw

def decode_pgn_130820_fusionSiriusxmArtist(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionSiriusxmArtist', 'Fusion: SiriusXM Artist')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 38
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "SiriusXM Artist", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFFFFFFFF, 32)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # artist | Offset: 56, Length: 96, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130820_fusionSiriusxmArtist(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFFFFFFFF) << 24
    # artist | Offset: 56, Length: 96, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Artist'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFF) << 56
    return data_raw

def decode_pgn_130820_fusionSiriusxmGenre(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130820."""
    nmea2000Message = NMEA2000Message(130820, 'fusionSiriusxmGenre', 'Fusion: SiriusXM Genre')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 419
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Fusion Electronics", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 40
    message_id_raw = (data_raw >> 16) & 0xFF
    message_id = lookup_FUSION_MESSAGE_ID(message_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "SiriusXM Genre", '', message_id, message_id_raw))

    # a | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFFFFFFFF, 32)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # genre | Offset: 56, Length: 96, Resolution: 1, Field Type: STRING_LZ
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130820_fusionSiriusxmGenre(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130820."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_FUSION_MESSAGE_ID(f.value) for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFFFFFFFF) << 24
    # genre | Offset: 56, Length: 96, Resolution: , Field Type: STRING_LZ
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Genre'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFF) << 56
    return data_raw


def is_fast_pgn_130821() -> bool:
    """Return True if PGN 130821 is a fast PGN."""
    return True
# Complex PGN. number of matches: 2
def decode_pgn_130821(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 275) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130821_navicoAsciiData(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1855) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130821_furunoUnknown130821(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_130821_navicoAsciiData(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130821."""
    nmea2000Message = NMEA2000Message(130821, 'navicoAsciiData', 'Navico: ASCII Data')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # message | Offset: 24, Length: 1840, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130821_navicoAsciiData(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130821."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 16
    # message | Offset: 24, Length: 1840, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 24
    return data_raw

def decode_pgn_130821_furunoUnknown130821(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130821."""
    nmea2000Message = NMEA2000Message(130821, 'furunoUnknown130821', 'Furuno: Unknown 130821')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1855
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Furuno", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # c | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # d | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    # e | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    # f | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    f_raw = decode_number((data_raw >> 64) & 0xFF, 8)
    f = f_raw * 1 if f_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('f', 'F', "", '', f, f_raw))

    # g | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    g_raw = decode_number((data_raw >> 72) & 0xFF, 8)
    g = g_raw * 1 if g_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('g', 'G', "", '', g, g_raw))

    # h | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    h_raw = decode_number((data_raw >> 80) & 0xFF, 8)
    h = h_raw * 1 if h_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('h', 'H', "", '', h, h_raw))

    # i | Offset: 88, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    i_raw = decode_number((data_raw >> 88) & 0xFF, 8)
    i = i_raw * 1 if i_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('i', 'I', "", '', i, i_raw))

    return nmea2000Message

def encode_pgn_130821_furunoUnknown130821(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130821."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 16
    # a | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 24
    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 32
    # c | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 40
    # d | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFF) << 48
    # e | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFF) << 56
    # f | Offset: 64, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'f'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'F'")
    data_raw |= (field_value & 0xFF) << 64
    # g | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'g'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'G'")
    data_raw |= (field_value & 0xFF) << 72
    # h | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'h'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'H'")
    data_raw |= (field_value & 0xFF) << 80
    # i | Offset: 88, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'i'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'I'")
    data_raw |= (field_value & 0xFF) << 88
    return data_raw


def is_fast_pgn_130822() -> bool:
    """Return True if PGN 130822 is a fast PGN."""
    return True
def decode_pgn_130822(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130822."""
    nmea2000Message = NMEA2000Message(130822, 'navicoUnknown1', 'Navico: Unknown 1')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # data | Offset: 16, Length: 1848, Resolution: 1, Field Type: BINARY
    # Skipping fields longer than 256

    return nmea2000Message

def encode_pgn_130822(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130822."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # data | Offset: 16, Length: 1848, Resolution: 1, Field Type: BINARY
    # Skipping fields longer than 256
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 16
    return data_raw


def is_fast_pgn_130823() -> bool:
    """Return True if PGN 130823 is a fast PGN."""
    return True
def decode_pgn_130823(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130823."""
    nmea2000Message = NMEA2000Message(130823, 'maretronProprietaryTemperatureHighRange', 'Maretron: Proprietary Temperature High Range')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 137
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Maretron", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    sid_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    sid = sid_raw * 1 if sid_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('sid', 'SID', "", '', sid, sid_raw))

    # instance | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # source | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    source_raw = (data_raw >> 32) & 0xFF
    source = lookup_TEMPERATURE_SOURCE(source_raw)
    nmea2000Message.fields.append(NMEA2000Field('source', 'Source', "", '', source, source_raw))

    # actual_temperature | Offset: 40, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    actual_temperature_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    actual_temperature = actual_temperature_raw * 0.1 if actual_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('actual_temperature', 'Actual Temperature', "", 'K', actual_temperature, actual_temperature_raw))

    # set_temperature | Offset: 56, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    set_temperature_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    set_temperature = set_temperature_raw * 0.1 if set_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('set_temperature', 'Set Temperature', "", 'K', set_temperature, set_temperature_raw))

    return nmea2000Message

def encode_pgn_130823(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130823."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # sid | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'sid'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'SID'")
    data_raw |= (field_value & 0xFF) << 16
    # instance | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 24
    # source | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TEMPERATURE_SOURCE(f.value) for f in nmea2000Message.fields if f.id == 'source'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Source'")
    data_raw |= (field_value & 0xFF) << 32
    # actual_temperature | Offset: 40, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'actual_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Actual Temperature'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 40
    
    # set_temperature | Offset: 56, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'set_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Set Temperature'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 56
    
    return data_raw


def is_fast_pgn_130824() -> bool:
    """Return True if PGN 130824 is a fast PGN."""
    return True
# Complex PGN. number of matches: 2
def decode_pgn_130824(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 381) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130824_bGKeyValueData(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 137) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130824_maretronAnnunciator(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_130824_bGKeyValueData(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130824."""
    nmea2000Message = NMEA2000Message(130824, 'bGKeyValueData', 'B&G: key-value data')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 381
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "B & G", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # key | Offset: 16, Length: 12, Resolution: 1, Field Type: FIELDTYPE_LOOKUP, Match: 
    key_raw = (data_raw >> 16) & 0xFFF
    key = key_raw * 1 if key_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('key', 'Key', "", '', key, key_raw))

    # length | Offset: 28, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    length_raw = decode_number((data_raw >> 28) & 0xF, 4)
    length = length_raw * 1 if length_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('length', 'Length', "Length of field 6", '', length, length_raw))


    return nmea2000Message

def encode_pgn_130824_bGKeyValueData(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130824."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # key | Offset: 16, Length: 12, Resolution: 1, Field Type: FIELDTYPE_LOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'key'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Key'")
    data_raw |= (field_value & 0xFFF) << 16
    # length | Offset: 28, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'length'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Length'")
    data_raw |= (field_value & 0xF) << 28
    raise Exception ("PGN 130824 not supporting encoding for now as Value is missing BitLength or BitOffset")
    return data_raw

def decode_pgn_130824_maretronAnnunciator(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130824."""
    nmea2000Message = NMEA2000Message(130824, 'maretronAnnunciator', 'Maretron: Annunciator')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 137
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Maretron", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # field_4 | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    field_4_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    field_4 = field_4_raw * 1 if field_4_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('field_4', 'Field 4', "", '', field_4, field_4_raw))

    # field_5 | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    field_5_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    field_5 = field_5_raw * 1 if field_5_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('field_5', 'Field 5', "", '', field_5, field_5_raw))

    # field_6 | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    field_6_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    field_6 = field_6_raw * 1 if field_6_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('field_6', 'Field 6', "", '', field_6, field_6_raw))

    # field_7 | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    field_7_raw = decode_number((data_raw >> 48) & 0xFF, 8)
    field_7 = field_7_raw * 1 if field_7_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('field_7', 'Field 7', "", '', field_7, field_7_raw))

    # field_8 | Offset: 56, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    field_8_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    field_8 = field_8_raw * 1 if field_8_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('field_8', 'Field 8', "", '', field_8, field_8_raw))

    return nmea2000Message

def encode_pgn_130824_maretronAnnunciator(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130824."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # field_4 | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'field_4'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Field 4'")
    data_raw |= (field_value & 0xFF) << 16
    # field_5 | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'field_5'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Field 5'")
    data_raw |= (field_value & 0xFF) << 24
    # field_6 | Offset: 32, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'field_6'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Field 6'")
    data_raw |= (field_value & 0xFFFF) << 32
    # field_7 | Offset: 48, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'field_7'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Field 7'")
    data_raw |= (field_value & 0xFF) << 48
    # field_8 | Offset: 56, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'field_8'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Field 8'")
    data_raw |= (field_value & 0xFFFF) << 56
    return data_raw


def is_fast_pgn_130825() -> bool:
    """Return True if PGN 130825 is a fast PGN."""
    return True
def decode_pgn_130825(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130825."""
    nmea2000Message = NMEA2000Message(130825, 'navicoUnknown2', 'Navico: Unknown 2')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 275
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Navico", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # data | Offset: 16, Length: 80, Resolution: 1, Field Type: BINARY, Match: 
    data_raw = (data_raw >> 16) & 0xFFFFFFFFFFFFFFFFFFFF
    data = data_raw * 1 if data_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data', 'Data', "", '', data, data_raw))

    return nmea2000Message

def encode_pgn_130825(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130825."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # data | Offset: 16, Length: 80, Resolution: 1, Field Type: BINARY
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFF) << 16
    return data_raw


def is_fast_pgn_130827() -> bool:
    """Return True if PGN 130827 is a fast PGN."""
    return True
def decode_pgn_130827(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130827."""
    nmea2000Message = NMEA2000Message(130827, 'lowranceUnknown', 'Lowrance: unknown')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 140
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Lowrance", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # c | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # d | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    # e | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    # f | Offset: 64, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    f_raw = decode_number((data_raw >> 64) & 0xFFFF, 16)
    f = f_raw * 1 if f_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('f', 'F', "", '', f, f_raw))

    return nmea2000Message

def encode_pgn_130827(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130827."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 16
    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 24
    # c | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 32
    # d | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFF) << 40
    # e | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFFFF) << 48
    # f | Offset: 64, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'f'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'F'")
    data_raw |= (field_value & 0xFFFF) << 64
    return data_raw


def is_fast_pgn_130828() -> bool:
    """Return True if PGN 130828 is a fast PGN."""
    return True
def decode_pgn_130828(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130828."""
    nmea2000Message = NMEA2000Message(130828, 'simnetSetSerialNumber', 'Simnet: Set Serial Number')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    return nmea2000Message

def encode_pgn_130828(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130828."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    return data_raw


def is_fast_pgn_130831() -> bool:
    """Return True if PGN 130831 is a fast PGN."""
    return True
def decode_pgn_130831(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130831."""
    nmea2000Message = NMEA2000Message(130831, 'suzukiEngineAndStorageDeviceConfig', 'Suzuki: Engine and Storage Device Config')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 586
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Suzuki Motor Corporation", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    return nmea2000Message

def encode_pgn_130831(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130831."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    return data_raw


def is_fast_pgn_130832() -> bool:
    """Return True if PGN 130832 is a fast PGN."""
    return True
def decode_pgn_130832(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130832."""
    nmea2000Message = NMEA2000Message(130832, 'simnetFuelUsedHighResolution', 'Simnet: Fuel Used - High Resolution')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    return nmea2000Message

def encode_pgn_130832(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130832."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    return data_raw


def is_fast_pgn_130833() -> bool:
    """Return True if PGN 130833 is a fast PGN."""
    return True
def decode_pgn_130833(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130833."""
    nmea2000Message = NMEA2000Message(130833, 'bGUserAndRemoteRename', 'B&G: User and Remote rename')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 381
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "B & G", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # data_type | Offset: 16, Length: 12, Resolution: 1, Field Type: FIELDTYPE_LOOKUP, Match: 
    data_type_raw = (data_raw >> 16) & 0xFFF
    data_type = data_type_raw * 1 if data_type_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('data_type', 'Data Type', "", '', data_type, data_type_raw))

    # length | Offset: 28, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    length_raw = decode_number((data_raw >> 28) & 0xF, 4)
    length = length_raw * 1 if length_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('length', 'Length', "Length of field 8", '', length, length_raw))

    # reserved_32 | Offset: 32, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_32_raw = (data_raw >> 32) & 0xFF
    reserved_32 = reserved_32_raw * 1 if reserved_32_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_32', 'Reserved', "", '', reserved_32, reserved_32_raw))

    # decimals | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    decimals_raw = (data_raw >> 40) & 0xFF
    decimals = lookup_BANDG_DECIMALS(decimals_raw)
    nmea2000Message.fields.append(NMEA2000Field('decimals', 'Decimals', "", '', decimals, decimals_raw))

    # short_name | Offset: 48, Length: 64, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # long_name | Offset: 112, Length: 128, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130833(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130833."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # data_type | Offset: 16, Length: 12, Resolution: 1, Field Type: FIELDTYPE_LOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'data_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Data Type'")
    data_raw |= (field_value & 0xFFF) << 16
    # length | Offset: 28, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'length'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Length'")
    data_raw |= (field_value & 0xF) << 28
    # reserved_32 | Offset: 32, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_32'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 32
    # decimals | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_BANDG_DECIMALS(f.value) for f in nmea2000Message.fields if f.id == 'decimals'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Decimals'")
    data_raw |= (field_value & 0xFF) << 40
    # short_name | Offset: 48, Length: 64, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Short name'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFF) << 48
    # long_name | Offset: 112, Length: 128, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Long name'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 112
    return data_raw


def is_fast_pgn_130834() -> bool:
    """Return True if PGN 130834 is a fast PGN."""
    return True
def decode_pgn_130834(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130834."""
    nmea2000Message = NMEA2000Message(130834, 'simnetEngineAndTankConfiguration', 'Simnet: Engine and Tank Configuration')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    return nmea2000Message

def encode_pgn_130834(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130834."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    return data_raw


def is_fast_pgn_130835() -> bool:
    """Return True if PGN 130835 is a fast PGN."""
    return True
def decode_pgn_130835(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130835."""
    nmea2000Message = NMEA2000Message(130835, 'simnetSetEngineAndTankConfiguration', 'Simnet: Set Engine and Tank Configuration')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    return nmea2000Message

def encode_pgn_130835(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130835."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    return data_raw


def is_fast_pgn_130836() -> bool:
    """Return True if PGN 130836 is a fast PGN."""
    return True
# Complex PGN. number of matches: 2
def decode_pgn_130836(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130836_simnetFluidLevelSensorConfiguration(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 137) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130836_maretronSwitchStatusCounter(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_130836_simnetFluidLevelSensorConfiguration(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130836."""
    nmea2000Message = NMEA2000Message(130836, 'simnetFluidLevelSensorConfiguration', 'Simnet: Fluid Level Sensor Configuration')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # c | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # device | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    device_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    device = device_raw * 1 if device_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('device', 'Device', "", '', device, device_raw))

    # instance | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # f | Offset: 40, Length: 4, Resolution: 1, Field Type: NUMBER, Match: 
    f_raw = decode_number((data_raw >> 40) & 0xF, 4)
    f = f_raw * 1 if f_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('f', 'F', "", '', f, f_raw))

    # tank_type | Offset: 44, Length: 4, Resolution: 1, Field Type: LOOKUP, Match: 
    tank_type_raw = (data_raw >> 44) & 0xF
    tank_type = lookup_TANK_TYPE(tank_type_raw)
    nmea2000Message.fields.append(NMEA2000Field('tank_type', 'Tank type', "", '', tank_type, tank_type_raw))

    # capacity | Offset: 48, Length: 32, Resolution: 0.1, Field Type: NUMBER, Match: 
    capacity_raw = decode_number((data_raw >> 48) & 0xFFFFFFFF, 32)
    capacity = capacity_raw * 0.1 if capacity_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('capacity', 'Capacity', "", 'L', capacity, capacity_raw))

    # g | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    g_raw = decode_number((data_raw >> 80) & 0xFF, 8)
    g = g_raw * 1 if g_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('g', 'G', "", '', g, g_raw))

    # h | Offset: 88, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    h_raw = decode_number((data_raw >> 88) & 0xFFFF, 16)
    if h_raw is not None and h_raw & (1 << (16 - 1)):
        h_raw -= (1 << 16)
    h = h_raw * 1 if h_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('h', 'H', "", '', h, h_raw))

    # i | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    i_raw = decode_number((data_raw >> 104) & 0xFF, 8)
    if i_raw is not None and i_raw & (1 << (8 - 1)):
        i_raw -= (1 << 8)
    i = i_raw * 1 if i_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('i', 'I', "", '', i, i_raw))

    return nmea2000Message

def encode_pgn_130836_simnetFluidLevelSensorConfiguration(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130836."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # c | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 16
    # device | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'device'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device'")
    data_raw |= (field_value & 0xFF) << 24
    # instance | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 32
    # f | Offset: 40, Length: 4, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'f'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'F'")
    data_raw |= (field_value & 0xF) << 40
    # tank_type | Offset: 44, Length: 4, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_TANK_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'tank_type'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Tank type'")
    data_raw |= (field_value & 0xF) << 44
    # capacity | Offset: 48, Length: 32, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'capacity'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Capacity'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFFFFFF) << 48
    
    # g | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'g'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'G'")
    data_raw |= (field_value & 0xFF) << 80
    # h | Offset: 88, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'h'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'H'")
    data_raw |= (field_value & 0xFFFF) << 88
    # i | Offset: 104, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'i'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'I'")
    data_raw |= (field_value & 0xFF) << 104
    return data_raw

def decode_pgn_130836_maretronSwitchStatusCounter(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130836."""
    nmea2000Message = NMEA2000Message(130836, 'maretronSwitchStatusCounter', 'Maretron: Switch Status Counter')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 137
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Maretron", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # indicator_number | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    indicator_number_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    indicator_number = indicator_number_raw * 1 if indicator_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('indicator_number', 'Indicator Number', "", '', indicator_number, indicator_number_raw))

    # start_date | Offset: 32, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    start_date_raw = (data_raw >> 32) & 0xFFFF
    start_date = decode_date(start_date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('start_date', 'Start Date', "", 'd', start_date, start_date_raw))

    # start_time | Offset: 48, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    start_time_raw = (data_raw >> 48) & 0xFFFFFFFF
    start_time = decode_time(start_time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('start_time', 'Start Time', "Seconds since midnight", 's', start_time, start_time_raw))

    # off_counter | Offset: 80, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    off_counter_raw = decode_number((data_raw >> 80) & 0xFFFFFFFF, 32)
    off_counter = off_counter_raw * 1 if off_counter_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('off_counter', 'OFF Counter', "", '', off_counter, off_counter_raw))

    # on_counter | Offset: 112, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    on_counter_raw = decode_number((data_raw >> 112) & 0xFFFFFFFF, 32)
    on_counter = on_counter_raw * 1 if on_counter_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('on_counter', 'ON Counter', "", '', on_counter, on_counter_raw))

    # error_counter | Offset: 144, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    error_counter_raw = decode_number((data_raw >> 144) & 0xFFFFFFFF, 32)
    error_counter = error_counter_raw * 1 if error_counter_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('error_counter', 'ERROR Counter', "", '', error_counter, error_counter_raw))

    # switch_status | Offset: 176, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch_status_raw = (data_raw >> 176) & 0x3
    switch_status = lookup_OFF_ON(switch_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch_status', 'Switch Status', "", '', switch_status, switch_status_raw))

    # reserved_178 | Offset: 178, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_178_raw = (data_raw >> 178) & 0x3F
    reserved_178 = reserved_178_raw * 1 if reserved_178_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_178', 'Reserved', "", '', reserved_178, reserved_178_raw))

    return nmea2000Message

def encode_pgn_130836_maretronSwitchStatusCounter(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130836."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 16
    # indicator_number | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'indicator_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator Number'")
    data_raw |= (field_value & 0xFF) << 24
    # start_date | Offset: 32, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start Date'")
    data_raw |= (field_value & 0xFFFF) << 32
    # start_time | Offset: 48, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 48
    
    # off_counter | Offset: 80, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'off_counter'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'OFF Counter'")
    data_raw |= (field_value & 0xFFFFFFFF) << 80
    # on_counter | Offset: 112, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'on_counter'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ON Counter'")
    data_raw |= (field_value & 0xFFFFFFFF) << 112
    # error_counter | Offset: 144, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'error_counter'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'ERROR Counter'")
    data_raw |= (field_value & 0xFFFFFFFF) << 144
    # switch_status | Offset: 176, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch Status'")
    data_raw |= (field_value & 0x3) << 176
    # reserved_178 | Offset: 178, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_178'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 178
    return data_raw


def is_fast_pgn_130837() -> bool:
    """Return True if PGN 130837 is a fast PGN."""
    return True
# Complex PGN. number of matches: 2
def decode_pgn_130837(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130837_simnetFuelFlowTurbineConfiguration(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 137) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130837_maretronSwitchStatusTimer(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_130837_simnetFuelFlowTurbineConfiguration(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130837."""
    nmea2000Message = NMEA2000Message(130837, 'simnetFuelFlowTurbineConfiguration', 'Simnet: Fuel Flow Turbine Configuration')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    return nmea2000Message

def encode_pgn_130837_simnetFuelFlowTurbineConfiguration(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130837."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    return data_raw

def decode_pgn_130837_maretronSwitchStatusTimer(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130837."""
    nmea2000Message = NMEA2000Message(130837, 'maretronSwitchStatusTimer', 'Maretron: Switch Status Timer')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 137
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Maretron", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    instance_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    instance = instance_raw * 1 if instance_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('instance', 'Instance', "", '', instance, instance_raw))

    # indicator_number | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    indicator_number_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    indicator_number = indicator_number_raw * 1 if indicator_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('indicator_number', 'Indicator Number', "", '', indicator_number, indicator_number_raw))

    # start_date | Offset: 32, Length: 16, Resolution: 1, Field Type: DATE, Match: 
    start_date_raw = (data_raw >> 32) & 0xFFFF
    start_date = decode_date(start_date_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('start_date', 'Start Date', "", 'd', start_date, start_date_raw))

    # start_time | Offset: 48, Length: 32, Resolution: 0.0001, Field Type: TIME, Match: 
    start_time_raw = (data_raw >> 48) & 0xFFFFFFFF
    start_time = decode_time(start_time_raw * 0.0001)
    nmea2000Message.fields.append(NMEA2000Field('start_time', 'Start Time', "Seconds since midnight", 's', start_time, start_time_raw))

    # accumulated_off_period | Offset: 80, Length: 32, Resolution: 1, Field Type: TIME, Match: 
    accumulated_off_period_raw = (data_raw >> 80) & 0xFFFFFFFF
    accumulated_off_period = decode_time(accumulated_off_period_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('accumulated_off_period', 'Accumulated OFF Period', "", 's', accumulated_off_period, accumulated_off_period_raw))

    # accumulated_on_period | Offset: 112, Length: 32, Resolution: 1, Field Type: TIME, Match: 
    accumulated_on_period_raw = (data_raw >> 112) & 0xFFFFFFFF
    accumulated_on_period = decode_time(accumulated_on_period_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('accumulated_on_period', 'Accumulated ON Period', "", 's', accumulated_on_period, accumulated_on_period_raw))

    # accumulated_error_period | Offset: 144, Length: 32, Resolution: 1, Field Type: TIME, Match: 
    accumulated_error_period_raw = (data_raw >> 144) & 0xFFFFFFFF
    accumulated_error_period = decode_time(accumulated_error_period_raw * 1)
    nmea2000Message.fields.append(NMEA2000Field('accumulated_error_period', 'Accumulated ERROR Period', "", 's', accumulated_error_period, accumulated_error_period_raw))

    # switch_status | Offset: 176, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    switch_status_raw = (data_raw >> 176) & 0x3
    switch_status = lookup_OFF_ON(switch_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('switch_status', 'Switch Status', "", '', switch_status, switch_status_raw))

    # reserved_178 | Offset: 178, Length: 6, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_178_raw = (data_raw >> 178) & 0x3F
    reserved_178 = reserved_178_raw * 1 if reserved_178_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_178', 'Reserved', "", '', reserved_178, reserved_178_raw))

    return nmea2000Message

def encode_pgn_130837_maretronSwitchStatusTimer(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130837."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # instance | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'instance'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Instance'")
    data_raw |= (field_value & 0xFF) << 16
    # indicator_number | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'indicator_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Indicator Number'")
    data_raw |= (field_value & 0xFF) << 24
    # start_date | Offset: 32, Length: 16, Resolution: 1, Field Type: DATE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_date'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start Date'")
    data_raw |= (field_value & 0xFFFF) << 32
    # start_time | Offset: 48, Length: 32, Resolution: 0.0001, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'start_time'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Start Time'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFFFFFF) << 48
    
    # accumulated_off_period | Offset: 80, Length: 32, Resolution: 1, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'accumulated_off_period'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Accumulated OFF Period'")
    data_raw |= (field_value & 0xFFFFFFFF) << 80
    # accumulated_on_period | Offset: 112, Length: 32, Resolution: 1, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'accumulated_on_period'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Accumulated ON Period'")
    data_raw |= (field_value & 0xFFFFFFFF) << 112
    # accumulated_error_period | Offset: 144, Length: 32, Resolution: 1, Field Type: TIME
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'accumulated_error_period'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Accumulated ERROR Period'")
    data_raw |= (field_value & 0xFFFFFFFF) << 144
    # switch_status | Offset: 176, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_OFF_ON(f.value) for f in nmea2000Message.fields if f.id == 'switch_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Switch Status'")
    data_raw |= (field_value & 0x3) << 176
    # reserved_178 | Offset: 178, Length: 6, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_178'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3F) << 178
    return data_raw


def is_fast_pgn_130838() -> bool:
    """Return True if PGN 130838 is a fast PGN."""
    return True
def decode_pgn_130838(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130838."""
    nmea2000Message = NMEA2000Message(130838, 'simnetFluidLevelWarning', 'Simnet: Fluid Level Warning')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    return nmea2000Message

def encode_pgn_130838(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130838."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    return data_raw


def is_fast_pgn_130839() -> bool:
    """Return True if PGN 130839 is a fast PGN."""
    return True
def decode_pgn_130839(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130839."""
    nmea2000Message = NMEA2000Message(130839, 'simnetPressureSensorConfiguration', 'Simnet: Pressure Sensor Configuration')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    return nmea2000Message

def encode_pgn_130839(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130839."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    return data_raw


def is_fast_pgn_130840() -> bool:
    """Return True if PGN 130840 is a fast PGN."""
    return True
def decode_pgn_130840(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130840."""
    nmea2000Message = NMEA2000Message(130840, 'simnetDataUserGroupConfiguration', 'Simnet: Data User Group Configuration')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    return nmea2000Message

def encode_pgn_130840(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130840."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    return data_raw


def is_fast_pgn_130842() -> bool:
    """Return True if PGN 130842 is a fast PGN."""
    return True
# Complex PGN. number of matches: 3
def decode_pgn_130842(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0x3F) == 0)
        ):
        return decode_pgn_130842_simnetAisClassBStaticDataMsg24PartA(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1855) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130842_furunoSixDegreesOfFreedomMovement(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0x3F) == 1)
        ):
        return decode_pgn_130842_simnetAisClassBStaticDataMsg24PartB(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_130842_simnetAisClassBStaticDataMsg24PartA(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130842."""
    nmea2000Message = NMEA2000Message(130842, 'simnetAisClassBStaticDataMsg24PartA', 'Simnet: AIS Class B static data (msg 24 Part A)')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 6, Resolution: 1, Field Type: NUMBER, Match: 0
    message_id_raw = decode_number((data_raw >> 16) & 0x3F, 6)
    message_id = message_id_raw * 1 if message_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Msg 24 Part A", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 22, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 22) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # d | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    # e | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    # user_id | Offset: 40, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    user_id_raw = (data_raw >> 40) & 0xFFFFFFFF
    user_id = user_id_raw * 1 if user_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('user_id', 'User ID', "", '', user_id, user_id_raw))

    # name | Offset: 72, Length: 160, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130842_simnetAisClassBStaticDataMsg24PartA(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130842."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 6, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 16
    # repeat_indicator | Offset: 22, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 22
    # d | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFF) << 24
    # e | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFF) << 32
    # user_id | Offset: 40, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'user_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'User ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 40
    # name | Offset: 72, Length: 160, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Name'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 72
    return data_raw

def decode_pgn_130842_furunoSixDegreesOfFreedomMovement(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130842."""
    nmea2000Message = NMEA2000Message(130842, 'furunoSixDegreesOfFreedomMovement', 'Furuno: Six Degrees Of Freedom Movement')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1855
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Furuno", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # a | Offset: 16, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 16) & 0xFFFFFFFF, 32)
    if a_raw is not None and a_raw & (1 << (32 - 1)):
        a_raw -= (1 << 32)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 48) & 0xFFFFFFFF, 32)
    if b_raw is not None and b_raw & (1 << (32 - 1)):
        b_raw -= (1 << 32)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # c | Offset: 80, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 80) & 0xFFFFFFFF, 32)
    if c_raw is not None and c_raw & (1 << (32 - 1)):
        c_raw -= (1 << 32)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # d | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 112) & 0xFF, 8)
    if d_raw is not None and d_raw & (1 << (8 - 1)):
        d_raw -= (1 << 8)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    # e | Offset: 120, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 120) & 0xFFFFFFFF, 32)
    if e_raw is not None and e_raw & (1 << (32 - 1)):
        e_raw -= (1 << 32)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    # f | Offset: 152, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    f_raw = decode_number((data_raw >> 152) & 0xFFFFFFFF, 32)
    if f_raw is not None and f_raw & (1 << (32 - 1)):
        f_raw -= (1 << 32)
    f = f_raw * 1 if f_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('f', 'F', "", '', f, f_raw))

    # g | Offset: 184, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    g_raw = decode_number((data_raw >> 184) & 0xFFFF, 16)
    if g_raw is not None and g_raw & (1 << (16 - 1)):
        g_raw -= (1 << 16)
    g = g_raw * 1 if g_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('g', 'G', "", '', g, g_raw))

    # h | Offset: 200, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    h_raw = decode_number((data_raw >> 200) & 0xFFFF, 16)
    if h_raw is not None and h_raw & (1 << (16 - 1)):
        h_raw -= (1 << 16)
    h = h_raw * 1 if h_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('h', 'H', "", '', h, h_raw))

    # i | Offset: 216, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    i_raw = decode_number((data_raw >> 216) & 0xFFFF, 16)
    if i_raw is not None and i_raw & (1 << (16 - 1)):
        i_raw -= (1 << 16)
    i = i_raw * 1 if i_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('i', 'I', "", '', i, i_raw))

    return nmea2000Message

def encode_pgn_130842_furunoSixDegreesOfFreedomMovement(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130842."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # a | Offset: 16, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFFFFFFFF) << 16
    # b | Offset: 48, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFFFFFFFF) << 48
    # c | Offset: 80, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFFFFFFFF) << 80
    # d | Offset: 112, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFF) << 112
    # e | Offset: 120, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFFFFFFFF) << 120
    # f | Offset: 152, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'f'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'F'")
    data_raw |= (field_value & 0xFFFFFFFF) << 152
    # g | Offset: 184, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'g'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'G'")
    data_raw |= (field_value & 0xFFFF) << 184
    # h | Offset: 200, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'h'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'H'")
    data_raw |= (field_value & 0xFFFF) << 200
    # i | Offset: 216, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'i'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'I'")
    data_raw |= (field_value & 0xFFFF) << 216
    return data_raw

def decode_pgn_130842_simnetAisClassBStaticDataMsg24PartB(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130842."""
    nmea2000Message = NMEA2000Message(130842, 'simnetAisClassBStaticDataMsg24PartB', 'Simnet: AIS Class B static data (msg 24 Part B)')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 6, Resolution: 1, Field Type: NUMBER, Match: 1
    message_id_raw = decode_number((data_raw >> 16) & 0x3F, 6)
    message_id = message_id_raw * 1 if message_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "Msg 24 Part B", '', message_id, message_id_raw))

    # repeat_indicator | Offset: 22, Length: 2, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 22) & 0x3
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # d | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    # e | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    # user_id | Offset: 40, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    user_id_raw = (data_raw >> 40) & 0xFFFFFFFF
    user_id = user_id_raw * 1 if user_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('user_id', 'User ID', "", '', user_id, user_id_raw))

    # type_of_ship | Offset: 72, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    type_of_ship_raw = (data_raw >> 72) & 0xFF
    type_of_ship = lookup_SHIP_TYPE(type_of_ship_raw)
    nmea2000Message.fields.append(NMEA2000Field('type_of_ship', 'Type of ship', "", '', type_of_ship, type_of_ship_raw))

    # vendor_id | Offset: 80, Length: 56, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # callsign | Offset: 136, Length: 56, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    # length | Offset: 192, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    length_raw = decode_number((data_raw >> 192) & 0xFFFF, 16)
    length = length_raw * 0.1 if length_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('length', 'Length', "", 'm', length, length_raw))

    # beam | Offset: 208, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    beam_raw = decode_number((data_raw >> 208) & 0xFFFF, 16)
    beam = beam_raw * 0.1 if beam_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('beam', 'Beam', "", 'm', beam, beam_raw))

    # position_reference_from_starboard | Offset: 224, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    position_reference_from_starboard_raw = decode_number((data_raw >> 224) & 0xFFFF, 16)
    position_reference_from_starboard = position_reference_from_starboard_raw * 0.1 if position_reference_from_starboard_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('position_reference_from_starboard', 'Position reference from Starboard', "", 'm', position_reference_from_starboard, position_reference_from_starboard_raw))

    # position_reference_from_bow | Offset: 240, Length: 16, Resolution: 0.1, Field Type: NUMBER, Match: 
    position_reference_from_bow_raw = decode_number((data_raw >> 240) & 0xFFFF, 16)
    position_reference_from_bow = position_reference_from_bow_raw * 0.1 if position_reference_from_bow_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('position_reference_from_bow', 'Position reference from Bow', "", 'm', position_reference_from_bow, position_reference_from_bow_raw))

    # mothership_user_id | Offset: 256, Length: 32, Resolution: 1, Field Type: MMSI, Match: 
    mothership_user_id_raw = (data_raw >> 256) & 0xFFFFFFFF
    mothership_user_id = mothership_user_id_raw * 1 if mothership_user_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('mothership_user_id', 'Mothership User ID', "", '', mothership_user_id, mothership_user_id_raw))

    # spare | Offset: 288, Length: 6, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 288) & 0x3F
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # reserved_294 | Offset: 294, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_294_raw = (data_raw >> 294) & 0x3
    reserved_294 = reserved_294_raw * 1 if reserved_294_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_294', 'Reserved', "", '', reserved_294, reserved_294_raw))

    return nmea2000Message

def encode_pgn_130842_simnetAisClassBStaticDataMsg24PartB(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130842."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 6, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0x3F) << 16
    # repeat_indicator | Offset: 22, Length: 2, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0x3) << 22
    # d | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFF) << 24
    # e | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFF) << 32
    # user_id | Offset: 40, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'user_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'User ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 40
    # type_of_ship | Offset: 72, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SHIP_TYPE(f.value) for f in nmea2000Message.fields if f.id == 'type_of_ship'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Type of ship'")
    data_raw |= (field_value & 0xFF) << 72
    # vendor_id | Offset: 80, Length: 56, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Vendor ID'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFF) << 80
    # callsign | Offset: 136, Length: 56, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Callsign'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFF) << 136
    # length | Offset: 192, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'length'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Length'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 192
    
    # beam | Offset: 208, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'beam'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Beam'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 208
    
    # position_reference_from_starboard | Offset: 224, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_reference_from_starboard'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position reference from Starboard'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 224
    
    # position_reference_from_bow | Offset: 240, Length: 16, Resolution: 0.1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'position_reference_from_bow'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Position reference from Bow'")        
    data_raw |= (int(field_value / 0.1) & 0xFFFF) << 240
    
    # mothership_user_id | Offset: 256, Length: 32, Resolution: 1, Field Type: MMSI
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'mothership_user_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Mothership User ID'")
    data_raw |= (field_value & 0xFFFFFFFF) << 256
    # spare | Offset: 288, Length: 6, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0x3F) << 288
    # reserved_294 | Offset: 294, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_294'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 294
    return data_raw


def is_fast_pgn_130843() -> bool:
    """Return True if PGN 130843 is a fast PGN."""
    return True
# Complex PGN. number of matches: 2
def decode_pgn_130843(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1855) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130843_furunoHeelAngleRollInformation(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130843_simnetSonarStatusFrequencyAndDspVoltage(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_130843_furunoHeelAngleRollInformation(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130843."""
    nmea2000Message = NMEA2000Message(130843, 'furunoHeelAngleRollInformation', 'Furuno: Heel Angle, Roll Information')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1855
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Furuno", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # yaw | Offset: 32, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    yaw_raw = decode_number((data_raw >> 32) & 0xFFFF, 16)
    if yaw_raw is not None and yaw_raw & (1 << (16 - 1)):
        yaw_raw -= (1 << 16)
    yaw = yaw_raw * 0.0001 if yaw_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('yaw', 'Yaw', "", 'rad', yaw, yaw_raw))

    # pitch | Offset: 48, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    pitch_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    if pitch_raw is not None and pitch_raw & (1 << (16 - 1)):
        pitch_raw -= (1 << 16)
    pitch = pitch_raw * 0.0001 if pitch_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('pitch', 'Pitch', "", 'rad', pitch, pitch_raw))

    # roll | Offset: 64, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    roll_raw = decode_number((data_raw >> 64) & 0xFFFF, 16)
    if roll_raw is not None and roll_raw & (1 << (16 - 1)):
        roll_raw -= (1 << 16)
    roll = roll_raw * 0.0001 if roll_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('roll', 'Roll', "", 'rad', roll, roll_raw))

    return nmea2000Message

def encode_pgn_130843_furunoHeelAngleRollInformation(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130843."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 16
    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 24
    # yaw | Offset: 32, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'yaw'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Yaw'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 32
    
    # pitch | Offset: 48, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'pitch'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Pitch'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 48
    
    # roll | Offset: 64, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'roll'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Roll'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 64
    
    return data_raw

def decode_pgn_130843_simnetSonarStatusFrequencyAndDspVoltage(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130843."""
    nmea2000Message = NMEA2000Message(130843, 'simnetSonarStatusFrequencyAndDspVoltage', 'Simnet: Sonar Status, Frequency and DSP Voltage')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    return nmea2000Message

def encode_pgn_130843_simnetSonarStatusFrequencyAndDspVoltage(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130843."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    return data_raw


def is_fast_pgn_130845() -> bool:
    """Return True if PGN 130845 is a fast PGN."""
    return True
# Complex PGN. number of matches: 2
def decode_pgn_130845(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1855) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130845_furunoMultiSatsInViewExtended(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130845_simnetKeyValue(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_130845_furunoMultiSatsInViewExtended(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130845."""
    nmea2000Message = NMEA2000Message(130845, 'furunoMultiSatsInViewExtended', 'Furuno: Multi Sats In View Extended')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1855
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Furuno", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    return nmea2000Message

def encode_pgn_130845_furunoMultiSatsInViewExtended(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130845."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    return data_raw

def decode_pgn_130845_simnetKeyValue(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130845."""
    nmea2000Message = NMEA2000Message(130845, 'simnetKeyValue', 'Simnet: Key Value')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # address | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    address_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    address = address_raw * 1 if address_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('address', 'Address', "NMEA 2000 address of commanded device", '', address, address_raw))

    # repeat_indicator | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    repeat_indicator_raw = (data_raw >> 24) & 0xFF
    repeat_indicator = lookup_REPEAT_INDICATOR(repeat_indicator_raw)
    nmea2000Message.fields.append(NMEA2000Field('repeat_indicator', 'Repeat Indicator', "", '', repeat_indicator, repeat_indicator_raw))

    # display_group | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    display_group_raw = (data_raw >> 32) & 0xFF
    display_group = lookup_SIMNET_DISPLAY_GROUP(display_group_raw)
    nmea2000Message.fields.append(NMEA2000Field('display_group', 'Display Group', "", '', display_group, display_group_raw))

    # reserved_40 | Offset: 40, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0xFF
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    # key | Offset: 48, Length: 16, Resolution: 1, Field Type: FIELDTYPE_LOOKUP, Match: 
    key_raw = (data_raw >> 48) & 0xFFFF
    key = key_raw * 1 if key_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('key', 'Key', "", '', key, key_raw))

    # spare | Offset: 64, Length: 8, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 64) & 0xFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # minlength | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    minlength_raw = decode_number((data_raw >> 72) & 0xFF, 8)
    minlength = minlength_raw * 1 if minlength_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('minlength', 'MinLength', "Length of data field", '', minlength, minlength_raw))


    return nmea2000Message

def encode_pgn_130845_simnetKeyValue(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130845."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # address | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'address'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Address'")
    data_raw |= (field_value & 0xFF) << 16
    # repeat_indicator | Offset: 24, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_REPEAT_INDICATOR(f.value) for f in nmea2000Message.fields if f.id == 'repeat_indicator'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Repeat Indicator'")
    data_raw |= (field_value & 0xFF) << 24
    # display_group | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DISPLAY_GROUP(f.value) for f in nmea2000Message.fields if f.id == 'display_group'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Display Group'")
    data_raw |= (field_value & 0xFF) << 32
    # reserved_40 | Offset: 40, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 40
    # key | Offset: 48, Length: 16, Resolution: 1, Field Type: FIELDTYPE_LOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'key'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Key'")
    data_raw |= (field_value & 0xFFFF) << 48
    # spare | Offset: 64, Length: 8, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFF) << 64
    # minlength | Offset: 72, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'minlength'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'MinLength'")
    data_raw |= (field_value & 0xFF) << 72
    raise Exception ("PGN 130845 not supporting encoding for now as Value is missing BitLength or BitOffset")
    return data_raw


def is_fast_pgn_130846() -> bool:
    """Return True if PGN 130846 is a fast PGN."""
    return True
# Complex PGN. number of matches: 2
def decode_pgn_130846(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130846_simnetParameterSet(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1855) and
        (((data_raw >> 13) & 0x7) == 4)
        ):
        return decode_pgn_130846_furunoMotionSensorStatusExtended(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_130846_simnetParameterSet(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130846."""
    nmea2000Message = NMEA2000Message(130846, 'simnetParameterSet', 'Simnet: Parameter Set')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # address | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    address_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    address = address_raw * 1 if address_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('address', 'Address', "NMEA 2000 address of commanded device", '', address, address_raw))

    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "00, 01 or FF observed", '', b, b_raw))

    # display_group | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    display_group_raw = (data_raw >> 32) & 0xFF
    display_group = lookup_SIMNET_DISPLAY_GROUP(display_group_raw)
    nmea2000Message.fields.append(NMEA2000Field('display_group', 'Display Group', "", '', display_group, display_group_raw))

    # d | Offset: 40, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "Various values observed", '', d, d_raw))

    # key | Offset: 56, Length: 16, Resolution: 1, Field Type: FIELDTYPE_LOOKUP, Match: 
    key_raw = (data_raw >> 56) & 0xFFFF
    key = key_raw * 1 if key_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('key', 'Key', "", '', key, key_raw))

    # spare | Offset: 72, Length: 8, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 72) & 0xFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # length | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    length_raw = decode_number((data_raw >> 80) & 0xFF, 8)
    length = length_raw * 1 if length_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('length', 'Length', "Length of data field", '', length, length_raw))


    return nmea2000Message

def encode_pgn_130846_simnetParameterSet(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130846."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # address | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'address'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Address'")
    data_raw |= (field_value & 0xFF) << 16
    # b | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 24
    # display_group | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DISPLAY_GROUP(f.value) for f in nmea2000Message.fields if f.id == 'display_group'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Display Group'")
    data_raw |= (field_value & 0xFF) << 32
    # d | Offset: 40, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFFFF) << 40
    # key | Offset: 56, Length: 16, Resolution: 1, Field Type: FIELDTYPE_LOOKUP
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'key'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Key'")
    data_raw |= (field_value & 0xFFFF) << 56
    # spare | Offset: 72, Length: 8, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFF) << 72
    # length | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'length'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Length'")
    data_raw |= (field_value & 0xFF) << 80
    raise Exception ("PGN 130846 not supporting encoding for now as Value is missing BitLength or BitOffset")
    return data_raw

def decode_pgn_130846_furunoMotionSensorStatusExtended(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130846."""
    nmea2000Message = NMEA2000Message(130846, 'furunoMotionSensorStatusExtended', 'Furuno: Motion Sensor Status Extended')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1855
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Furuno", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    return nmea2000Message

def encode_pgn_130846_furunoMotionSensorStatusExtended(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130846."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    return data_raw


def is_fast_pgn_130847() -> bool:
    """Return True if PGN 130847 is a fast PGN."""
    return True
def decode_pgn_130847(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130847."""
    nmea2000Message = NMEA2000Message(130847, 'seatalkNodeStatistics', 'SeaTalk: Node Statistics')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1851
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Raymarine", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # product_code | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    product_code_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    product_code = product_code_raw * 1 if product_code_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('product_code', 'Product Code', "", '', product_code, product_code_raw))

    # year | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    year_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    year = year_raw * 1 if year_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('year', 'Year', "", '', year, year_raw))

    # month | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    month_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    month = month_raw * 1 if month_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('month', 'Month', "", '', month, month_raw))

    # device_number | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    device_number_raw = decode_number((data_raw >> 48) & 0xFFFF, 16)
    device_number = device_number_raw * 1 if device_number_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('device_number', 'Device Number', "", '', device_number, device_number_raw))

    # node_voltage | Offset: 64, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    node_voltage_raw = decode_number((data_raw >> 64) & 0xFFFF, 16)
    node_voltage = node_voltage_raw * 0.01 if node_voltage_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('node_voltage', 'Node Voltage', "", 'V', node_voltage, node_voltage_raw))

    return nmea2000Message

def encode_pgn_130847(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130847."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # product_code | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'product_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Product Code'")
    data_raw |= (field_value & 0xFFFF) << 16
    # year | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'year'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Year'")
    data_raw |= (field_value & 0xFF) << 32
    # month | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'month'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Month'")
    data_raw |= (field_value & 0xFF) << 40
    # device_number | Offset: 48, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'device_number'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Device Number'")
    data_raw |= (field_value & 0xFFFF) << 48
    # node_voltage | Offset: 64, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'node_voltage'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Node Voltage'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 64
    
    return data_raw


def is_fast_pgn_130850() -> bool:
    """Return True if PGN 130850 is a fast PGN."""
    return True
# Complex PGN. number of matches: 3
def decode_pgn_130850(data_raw: int) -> NMEA2000Message:
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 32) & 0xFF) == 255)
        ):
        return decode_pgn_130850_simnetApCommand(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 16) & 0xFF) == 2)
        ):
        return decode_pgn_130850_simnetEventCommandApCommand(data_raw)
    
    match_ok = True
    if (
        (((data_raw >> 0) & 0x7FF) == 1857) and
        (((data_raw >> 13) & 0x7) == 4) and
        (((data_raw >> 32) & 0xFF) == 1)
        ):
        return decode_pgn_130850_simnetAlarm(data_raw)
    
    raise Exception("No matching sub-PGN found")
def decode_pgn_130850_simnetApCommand(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130850."""
    nmea2000Message = NMEA2000Message(130850, 'simnetApCommand', 'Simnet: AP Command')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # address | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    address_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    address = address_raw * 1 if address_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('address', 'Address', "NMEA 2000 address of commanded device", '', address, address_raw))

    # reserved_24 | Offset: 24, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_24_raw = (data_raw >> 24) & 0xFF
    reserved_24 = reserved_24_raw * 1 if reserved_24_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_24', 'Reserved', "", '', reserved_24, reserved_24_raw))

    # proprietary_id | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 255
    proprietary_id_raw = (data_raw >> 32) & 0xFF
    proprietary_id = lookup_SIMNET_EVENT_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Autopilot", '', proprietary_id, proprietary_id_raw))

    # ap_status | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    ap_status_raw = (data_raw >> 40) & 0xFF
    ap_status = lookup_SIMNET_AP_STATUS(ap_status_raw)
    nmea2000Message.fields.append(NMEA2000Field('ap_status', 'AP status', "", '', ap_status, ap_status_raw))

    # ap_command | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    ap_command_raw = (data_raw >> 48) & 0xFF
    ap_command = lookup_SIMNET_AP_EVENTS(ap_command_raw)
    nmea2000Message.fields.append(NMEA2000Field('ap_command', 'AP Command', "", '', ap_command, ap_command_raw))

    # spare | Offset: 56, Length: 8, Resolution: 1, Field Type: SPARE, Match: 
    spare_raw = (data_raw >> 56) & 0xFF
    spare = spare_raw * 1 if spare_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('spare', 'Spare', "", '', spare, spare_raw))

    # direction | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    direction_raw = (data_raw >> 64) & 0xFF
    direction = lookup_SIMNET_DIRECTION(direction_raw)
    nmea2000Message.fields.append(NMEA2000Field('direction', 'Direction', "", '', direction, direction_raw))

    # angle | Offset: 72, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    angle_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    angle = angle_raw * 0.0001 if angle_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('angle', 'Angle', "Commanded angle change", 'rad', angle, angle_raw))

    return nmea2000Message

def encode_pgn_130850_simnetApCommand(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130850."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # address | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'address'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Address'")
    data_raw |= (field_value & 0xFF) << 16
    # reserved_24 | Offset: 24, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_24'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 24
    # proprietary_id | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_EVENT_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 32
    # ap_status | Offset: 40, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_AP_STATUS(f.value) for f in nmea2000Message.fields if f.id == 'ap_status'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AP status'")
    data_raw |= (field_value & 0xFF) << 40
    # ap_command | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_AP_EVENTS(f.value) for f in nmea2000Message.fields if f.id == 'ap_command'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'AP Command'")
    data_raw |= (field_value & 0xFF) << 48
    # spare | Offset: 56, Length: 8, Resolution: 1, Field Type: SPARE
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'spare'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Spare'")
    data_raw |= (field_value & 0xFF) << 56
    # direction | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DIRECTION(f.value) for f in nmea2000Message.fields if f.id == 'direction'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Direction'")
    data_raw |= (field_value & 0xFF) << 64
    # angle | Offset: 72, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'angle'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Angle'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 72
    
    return data_raw

def decode_pgn_130850_simnetEventCommandApCommand(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130850."""
    nmea2000Message = NMEA2000Message(130850, 'simnetEventCommandApCommand', 'Simnet: Event Command: AP command')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 2
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_SIMNET_EVENT_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "AP command", '', proprietary_id, proprietary_id_raw))

    # unused_a | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    unused_a_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    unused_a = unused_a_raw * 1 if unused_a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unused_a', 'Unused A', "", '', unused_a, unused_a_raw))

    # controlling_device | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    controlling_device_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    controlling_device = controlling_device_raw * 1 if controlling_device_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('controlling_device', 'Controlling Device', "", '', controlling_device, controlling_device_raw))

    # event | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    event_raw = (data_raw >> 48) & 0xFF
    event = lookup_SIMNET_AP_EVENTS(event_raw)
    nmea2000Message.fields.append(NMEA2000Field('event', 'Event', "", '', event, event_raw))

    # unused_b | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    unused_b_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    unused_b = unused_b_raw * 1 if unused_b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unused_b', 'Unused B', "", '', unused_b, unused_b_raw))

    # direction | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    direction_raw = (data_raw >> 64) & 0xFF
    direction = lookup_SIMNET_DIRECTION(direction_raw)
    nmea2000Message.fields.append(NMEA2000Field('direction', 'Direction', "", '', direction, direction_raw))

    # angle | Offset: 72, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    angle_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    angle = angle_raw * 0.0001 if angle_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('angle', 'Angle', "", 'rad', angle, angle_raw))

    # unused_c | Offset: 88, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    unused_c_raw = decode_number((data_raw >> 88) & 0xFF, 8)
    unused_c = unused_c_raw * 1 if unused_c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('unused_c', 'Unused C', "", '', unused_c, unused_c_raw))

    return nmea2000Message

def encode_pgn_130850_simnetEventCommandApCommand(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130850."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_EVENT_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # unused_a | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unused_a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unused A'")
    data_raw |= (field_value & 0xFFFF) << 24
    # controlling_device | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'controlling_device'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Controlling Device'")
    data_raw |= (field_value & 0xFF) << 40
    # event | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_AP_EVENTS(f.value) for f in nmea2000Message.fields if f.id == 'event'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Event'")
    data_raw |= (field_value & 0xFF) << 48
    # unused_b | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unused_b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unused B'")
    data_raw |= (field_value & 0xFF) << 56
    # direction | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DIRECTION(f.value) for f in nmea2000Message.fields if f.id == 'direction'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Direction'")
    data_raw |= (field_value & 0xFF) << 64
    # angle | Offset: 72, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'angle'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Angle'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 72
    
    # unused_c | Offset: 88, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'unused_c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Unused C'")
    data_raw |= (field_value & 0xFF) << 88
    return data_raw

def decode_pgn_130850_simnetAlarm(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130850."""
    nmea2000Message = NMEA2000Message(130850, 'simnetAlarm', 'Simnet: Alarm')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # address | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    address_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    address = address_raw * 1 if address_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('address', 'Address', "NMEA 2000 address of commanded device", '', address, address_raw))

    # reserved_24 | Offset: 24, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_24_raw = (data_raw >> 24) & 0xFF
    reserved_24 = reserved_24_raw * 1 if reserved_24_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_24', 'Reserved', "", '', reserved_24, reserved_24_raw))

    # proprietary_id | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 1
    proprietary_id_raw = (data_raw >> 32) & 0xFF
    proprietary_id = lookup_SIMNET_EVENT_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "Alarm", '', proprietary_id, proprietary_id_raw))

    # reserved_40 | Offset: 40, Length: 8, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_40_raw = (data_raw >> 40) & 0xFF
    reserved_40 = reserved_40_raw * 1 if reserved_40_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_40', 'Reserved', "", '', reserved_40, reserved_40_raw))

    # alarm | Offset: 48, Length: 16, Resolution: 1, Field Type: LOOKUP, Match: 
    alarm_raw = (data_raw >> 48) & 0xFFFF
    alarm = lookup_SIMNET_ALARM(alarm_raw)
    nmea2000Message.fields.append(NMEA2000Field('alarm', 'Alarm', "", '', alarm, alarm_raw))

    # message_id | Offset: 64, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    message_id_raw = decode_number((data_raw >> 64) & 0xFFFF, 16)
    message_id = message_id_raw * 1 if message_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # f | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    f_raw = decode_number((data_raw >> 80) & 0xFF, 8)
    f = f_raw * 1 if f_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('f', 'F', "", '', f, f_raw))

    # g | Offset: 88, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    g_raw = decode_number((data_raw >> 88) & 0xFF, 8)
    g = g_raw * 1 if g_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('g', 'G', "", '', g, g_raw))

    return nmea2000Message

def encode_pgn_130850_simnetAlarm(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130850."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # address | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'address'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Address'")
    data_raw |= (field_value & 0xFF) << 16
    # reserved_24 | Offset: 24, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_24'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 24
    # proprietary_id | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_EVENT_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 32
    # reserved_40 | Offset: 40, Length: 8, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_40'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0xFF) << 40
    # alarm | Offset: 48, Length: 16, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_ALARM(f.value) for f in nmea2000Message.fields if f.id == 'alarm'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Alarm'")
    data_raw |= (field_value & 0xFFFF) << 48
    # message_id | Offset: 64, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFFFF) << 64
    # f | Offset: 80, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'f'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'F'")
    data_raw |= (field_value & 0xFF) << 80
    # g | Offset: 88, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'g'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'G'")
    data_raw |= (field_value & 0xFF) << 88
    return data_raw


def is_fast_pgn_130851() -> bool:
    """Return True if PGN 130851 is a fast PGN."""
    return True
def decode_pgn_130851(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130851."""
    nmea2000Message = NMEA2000Message(130851, 'simnetEventReplyApCommand', 'Simnet: Event Reply: AP command')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 2
    proprietary_id_raw = (data_raw >> 16) & 0xFF
    proprietary_id = lookup_SIMNET_EVENT_COMMAND(proprietary_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('proprietary_id', 'Proprietary ID', "AP command", '', proprietary_id, proprietary_id_raw))

    # b | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # address | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    address_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    address = address_raw * 1 if address_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('address', 'Address', "NMEA 2000 address of controlling device", '', address, address_raw))

    # event | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    event_raw = (data_raw >> 48) & 0xFF
    event = lookup_SIMNET_AP_EVENTS(event_raw)
    nmea2000Message.fields.append(NMEA2000Field('event', 'Event', "", '', event, event_raw))

    # c | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 56) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # direction | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    direction_raw = (data_raw >> 64) & 0xFF
    direction = lookup_SIMNET_DIRECTION(direction_raw)
    nmea2000Message.fields.append(NMEA2000Field('direction', 'Direction', "", '', direction, direction_raw))

    # angle | Offset: 72, Length: 16, Resolution: 0.0001, Field Type: NUMBER, Match: 
    angle_raw = decode_number((data_raw >> 72) & 0xFFFF, 16)
    angle = angle_raw * 0.0001 if angle_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('angle', 'Angle', "", 'rad', angle, angle_raw))

    # g | Offset: 88, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    g_raw = decode_number((data_raw >> 88) & 0xFF, 8)
    g = g_raw * 1 if g_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('g', 'G', "", '', g, g_raw))

    return nmea2000Message

def encode_pgn_130851(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130851."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # proprietary_id | Offset: 16, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_EVENT_COMMAND(f.value) for f in nmea2000Message.fields if f.id == 'proprietary_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Proprietary ID'")
    data_raw |= (field_value & 0xFF) << 16
    # b | Offset: 24, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFFFF) << 24
    # address | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'address'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Address'")
    data_raw |= (field_value & 0xFF) << 40
    # event | Offset: 48, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_AP_EVENTS(f.value) for f in nmea2000Message.fields if f.id == 'event'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Event'")
    data_raw |= (field_value & 0xFF) << 48
    # c | Offset: 56, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 56
    # direction | Offset: 64, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_SIMNET_DIRECTION(f.value) for f in nmea2000Message.fields if f.id == 'direction'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Direction'")
    data_raw |= (field_value & 0xFF) << 64
    # angle | Offset: 72, Length: 16, Resolution: 0.0001, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'angle'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Angle'")        
    data_raw |= (int(field_value / 0.0001) & 0xFFFF) << 72
    
    # g | Offset: 88, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'g'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'G'")
    data_raw |= (field_value & 0xFF) << 88
    return data_raw


def is_fast_pgn_130856() -> bool:
    """Return True if PGN 130856 is a fast PGN."""
    return True
def decode_pgn_130856(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130856."""
    nmea2000Message = NMEA2000Message(130856, 'simnetAlarmMessage', 'Simnet: Alarm Message')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # message_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER, Match: 
    message_id_raw = decode_number((data_raw >> 16) & 0xFFFF, 16)
    message_id = message_id_raw * 1 if message_id_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('message_id', 'Message ID', "", '', message_id, message_id_raw))

    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 32) & 0xFF, 8)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # c | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # text | Offset: 48, Length: 1784, Resolution: 1, Field Type: STRING_FIX
    # Skipping STRING field types

    return nmea2000Message

def encode_pgn_130856(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130856."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # message_id | Offset: 16, Length: 16, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'message_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Message ID'")
    data_raw |= (field_value & 0xFFFF) << 16
    # b | Offset: 32, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFF) << 32
    # c | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 40
    # text | Offset: 48, Length: 1784, Resolution: , Field Type: STRING_FIX
    # Skipping STRING field types
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Text'")
    data_raw |= (field_value & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) << 48
    return data_raw


def is_fast_pgn_130860() -> bool:
    """Return True if PGN 130860 is a fast PGN."""
    return True
def decode_pgn_130860(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130860."""
    nmea2000Message = NMEA2000Message(130860, 'simnetApUnknown4', 'Simnet: AP Unknown 4')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 1857
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Simrad", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    a_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    a = a_raw * 1 if a_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('a', 'A', "", '', a, a_raw))

    # b | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    b_raw = decode_number((data_raw >> 24) & 0xFFFFFFFF, 32)
    if b_raw is not None and b_raw & (1 << (32 - 1)):
        b_raw -= (1 << 32)
    b = b_raw * 1 if b_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('b', 'B', "", '', b, b_raw))

    # c | Offset: 56, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 56) & 0xFFFFFFFF, 32)
    if c_raw is not None and c_raw & (1 << (32 - 1)):
        c_raw -= (1 << 32)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # d | Offset: 88, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    d_raw = decode_number((data_raw >> 88) & 0xFFFFFFFF, 32)
    d = d_raw * 1 if d_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('d', 'D', "", '', d, d_raw))

    # e | Offset: 120, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    e_raw = decode_number((data_raw >> 120) & 0xFFFFFFFF, 32)
    if e_raw is not None and e_raw & (1 << (32 - 1)):
        e_raw -= (1 << 32)
    e = e_raw * 1 if e_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('e', 'E', "", '', e, e_raw))

    # f | Offset: 152, Length: 32, Resolution: 1, Field Type: NUMBER, Match: 
    f_raw = decode_number((data_raw >> 152) & 0xFFFFFFFF, 32)
    f = f_raw * 1 if f_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('f', 'F', "", '', f, f_raw))

    return nmea2000Message

def encode_pgn_130860(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130860."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # a | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'a'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'A'")
    data_raw |= (field_value & 0xFF) << 16
    # b | Offset: 24, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'b'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'B'")
    data_raw |= (field_value & 0xFFFFFFFF) << 24
    # c | Offset: 56, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFFFFFFFF) << 56
    # d | Offset: 88, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'd'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'D'")
    data_raw |= (field_value & 0xFFFFFFFF) << 88
    # e | Offset: 120, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'e'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'E'")
    data_raw |= (field_value & 0xFFFFFFFF) << 120
    # f | Offset: 152, Length: 32, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'f'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'F'")
    data_raw |= (field_value & 0xFFFFFFFF) << 152
    return data_raw


def is_fast_pgn_130880() -> bool:
    """Return True if PGN 130880 is a fast PGN."""
    return True
def decode_pgn_130880(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130880."""
    nmea2000Message = NMEA2000Message(130880, 'airmarAdditionalWeatherData', 'Airmar: Additional Weather Data')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # c | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # apparent_windchill_temperature | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    apparent_windchill_temperature_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    apparent_windchill_temperature = apparent_windchill_temperature_raw * 0.01 if apparent_windchill_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('apparent_windchill_temperature', 'Apparent Windchill Temperature', "", 'K', apparent_windchill_temperature, apparent_windchill_temperature_raw))

    # true_windchill_temperature | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    true_windchill_temperature_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    true_windchill_temperature = true_windchill_temperature_raw * 0.01 if true_windchill_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('true_windchill_temperature', 'True Windchill Temperature', "", 'K', true_windchill_temperature, true_windchill_temperature_raw))

    # dewpoint | Offset: 56, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    dewpoint_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    dewpoint = dewpoint_raw * 0.01 if dewpoint_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dewpoint', 'Dewpoint', "", 'K', dewpoint, dewpoint_raw))

    return nmea2000Message

def encode_pgn_130880(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130880."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # c | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 16
    # apparent_windchill_temperature | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'apparent_windchill_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Apparent Windchill Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 24
    
    # true_windchill_temperature | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'true_windchill_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'True Windchill Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 40
    
    # dewpoint | Offset: 56, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dewpoint'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Dewpoint'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 56
    
    return data_raw


def is_fast_pgn_130881() -> bool:
    """Return True if PGN 130881 is a fast PGN."""
    return True
def decode_pgn_130881(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130881."""
    nmea2000Message = NMEA2000Message(130881, 'airmarHeaterControl', 'Airmar: Heater Control')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # c | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    c_raw = decode_number((data_raw >> 16) & 0xFF, 8)
    c = c_raw * 1 if c_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('c', 'C', "", '', c, c_raw))

    # plate_temperature | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    plate_temperature_raw = decode_number((data_raw >> 24) & 0xFFFF, 16)
    plate_temperature = plate_temperature_raw * 0.01 if plate_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('plate_temperature', 'Plate Temperature', "", 'K', plate_temperature, plate_temperature_raw))

    # air_temperature | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    air_temperature_raw = decode_number((data_raw >> 40) & 0xFFFF, 16)
    air_temperature = air_temperature_raw * 0.01 if air_temperature_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('air_temperature', 'Air Temperature', "", 'K', air_temperature, air_temperature_raw))

    # dewpoint | Offset: 56, Length: 16, Resolution: 0.01, Field Type: NUMBER, Match: 
    dewpoint_raw = decode_number((data_raw >> 56) & 0xFFFF, 16)
    dewpoint = dewpoint_raw * 0.01 if dewpoint_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('dewpoint', 'Dewpoint', "", 'K', dewpoint, dewpoint_raw))

    return nmea2000Message

def encode_pgn_130881(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130881."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # c | Offset: 16, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'c'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'C'")
    data_raw |= (field_value & 0xFF) << 16
    # plate_temperature | Offset: 24, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'plate_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Plate Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 24
    
    # air_temperature | Offset: 40, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'air_temperature'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Air Temperature'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 40
    
    # dewpoint | Offset: 56, Length: 16, Resolution: 0.01, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'dewpoint'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Dewpoint'")        
    data_raw |= (int(field_value / 0.01) & 0xFFFF) << 56
    
    return data_raw


def is_fast_pgn_130944() -> bool:
    """Return True if PGN 130944 is a fast PGN."""
    return True
def decode_pgn_130944(data_raw: int) -> NMEA2000Message:
    """Decode PGN 130944."""
    nmea2000Message = NMEA2000Message(130944, 'airmarPost', 'Airmar: POST')
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP, Match: 135
    manufacturer_code_raw = (data_raw >> 0) & 0x7FF
    manufacturer_code = lookup_MANUFACTURER_CODE(manufacturer_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('manufacturer_code', 'Manufacturer Code', "Airmar", '', manufacturer_code, manufacturer_code_raw))

    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_11_raw = (data_raw >> 11) & 0x3
    reserved_11 = reserved_11_raw * 1 if reserved_11_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_11', 'Reserved', "", '', reserved_11, reserved_11_raw))

    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP, Match: 4
    industry_code_raw = (data_raw >> 13) & 0x7
    industry_code = lookup_INDUSTRY_CODE(industry_code_raw)
    nmea2000Message.fields.append(NMEA2000Field('industry_code', 'Industry Code', "Marine Industry", '', industry_code, industry_code_raw))

    # control | Offset: 16, Length: 1, Resolution: 1, Field Type: LOOKUP, Match: 
    control_raw = (data_raw >> 16) & 0x1
    control = lookup_AIRMAR_POST_CONTROL(control_raw)
    nmea2000Message.fields.append(NMEA2000Field('control', 'Control', "", '', control, control_raw))

    # reserved_17 | Offset: 17, Length: 7, Resolution: 1, Field Type: RESERVED, Match: 
    reserved_17_raw = (data_raw >> 17) & 0x7F
    reserved_17 = reserved_17_raw * 1 if reserved_17_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('reserved_17', 'Reserved', "", '', reserved_17, reserved_17_raw))

    # number_of_id_test_result_pairs_to_follow | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    number_of_id_test_result_pairs_to_follow_raw = decode_number((data_raw >> 24) & 0xFF, 8)
    number_of_id_test_result_pairs_to_follow = number_of_id_test_result_pairs_to_follow_raw * 1 if number_of_id_test_result_pairs_to_follow_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('number_of_id_test_result_pairs_to_follow', 'Number of ID/test result pairs to follow', "", '', number_of_id_test_result_pairs_to_follow, number_of_id_test_result_pairs_to_follow_raw))

    # test_id | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP, Match: 
    test_id_raw = (data_raw >> 32) & 0xFF
    test_id = lookup_AIRMAR_POST_ID(test_id_raw)
    nmea2000Message.fields.append(NMEA2000Field('test_id', 'Test ID', "See Airmar docs for table of IDs and failure codes; these lookup values are for DST200", '', test_id, test_id_raw))

    # test_result | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER, Match: 
    test_result_raw = decode_number((data_raw >> 40) & 0xFF, 8)
    test_result = test_result_raw * 1 if test_result_raw is not None else None
    nmea2000Message.fields.append(NMEA2000Field('test_result', 'Test result', "Values other than 0 are failure codes", '', test_result, test_result_raw))

    return nmea2000Message

def encode_pgn_130944(nmea2000Message: NMEA2000Message) -> int:
    """Encode Nmea2000Message object to binary data for PGN 130944."""
    data_raw = 0
    # manufacturer_code | Offset: 0, Length: 11, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_MANUFACTURER_CODE(f.value) for f in nmea2000Message.fields if f.id == 'manufacturer_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Manufacturer Code'")
    data_raw |= (field_value & 0x7FF) << 0
    # reserved_11 | Offset: 11, Length: 2, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_11'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x3) << 11
    # industry_code | Offset: 13, Length: 3, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_INDUSTRY_CODE(f.value) for f in nmea2000Message.fields if f.id == 'industry_code'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Industry Code'")
    data_raw |= (field_value & 0x7) << 13
    # control | Offset: 16, Length: 1, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_POST_CONTROL(f.value) for f in nmea2000Message.fields if f.id == 'control'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Control'")
    data_raw |= (field_value & 0x1) << 16
    # reserved_17 | Offset: 17, Length: 7, Resolution: 1, Field Type: RESERVED
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'reserved_17'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Reserved'")
    data_raw |= (field_value & 0x7F) << 17
    # number_of_id_test_result_pairs_to_follow | Offset: 24, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'number_of_id_test_result_pairs_to_follow'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Number of ID/test result pairs to follow'")
    data_raw |= (field_value & 0xFF) << 24
    # test_id | Offset: 32, Length: 8, Resolution: 1, Field Type: LOOKUP
    field_value = next((f.raw_value if f.raw_value is not None else lookup_encode_AIRMAR_POST_ID(f.value) for f in nmea2000Message.fields if f.id == 'test_id'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Test ID'")
    data_raw |= (field_value & 0xFF) << 32
    # test_result | Offset: 40, Length: 8, Resolution: 1, Field Type: NUMBER
    field_value = next((f.value for f in nmea2000Message.fields if f.id == 'test_result'), None)
    if field_value is None:
        raise Exception(f"Cant encode this message, missing 'Test result'")
    data_raw |= (field_value & 0xFF) << 40
    return data_raw

