{"version":3,"file":"Distribute_ReadFuncCardFPGAVersion.cjs","names":["Request"],"sources":["../../generated/api/Distribute_ReadFuncCardFPGAVersion.ts"],"sourcesContent":["import { decodeUIntLE, Packet, Request, Session } from '@novastar/codec';\nimport AddressMapping from '../AddressMapping';\n\ndeclare module '@novastar/codec' {\n  interface API {\n    Distribute_ReadFuncCardFPGAVersion(\n      addr: number,\n      portAddr: number,\n      distributeAddr: number\n    ): Promise<number>;\n    tryDistribute_ReadFuncCardFPGAVersion(\n      addr: number,\n      portAddr: number,\n      distributeAddr: number\n    ): Promise<Packet | null>;\n  }\n}\nexport default function createDistribute_ReadFuncCardFPGAVersion(\n  addr: number,\n  portAddr: number,\n  distributeAddr: number\n): Request {\n  const req = new Request(\n    AddressMapping.Distribute_FPGAVersionOccupancy,\n    'Distribute_ReadFuncCardFPGAVersion'\n  );\n  req.destination = addr;\n  req.deviceType = 3;\n  req.port = portAddr;\n  req.rcvIndex = distributeAddr;\n  req.address = AddressMapping.Distribute_FPGAVersionAddr;\n  return req;\n}\nSession.prototype.Distribute_ReadFuncCardFPGAVersion =\n  async function Distribute_ReadFuncCardFPGAVersion(\n    this: Session,\n    addr: number,\n    portAddr: number,\n    distributeAddr: number\n  ): Promise<number> {\n    const req = createDistribute_ReadFuncCardFPGAVersion(addr, portAddr, distributeAddr);\n    return decodeUIntLE(await this.connection.send(req));\n  };\nSession.prototype.tryDistribute_ReadFuncCardFPGAVersion =\n  async function tryDistribute_ReadFuncCardFPGAVersion(\n    this: Session,\n    addr: number,\n    portAddr: number,\n    distributeAddr: number\n  ): Promise<Packet | null> {\n    const req = createDistribute_ReadFuncCardFPGAVersion(addr, portAddr, distributeAddr);\n    return this.connection.trySend(req);\n  };\n"],"mappings":";;;;;AAiBA,SAAwB,yCACtB,MACA,UACA,gBACS;CACT,MAAM,MAAM,IAAIA,2BAEd,oCACF;CACA,IAAI,cAAc;CAClB,IAAI,aAAa;CACjB,IAAI,OAAO;CACX,IAAI,WAAW;CACf,IAAI;CACJ,OAAO;AACT;AACA,wBAAQ,UAAU,qCAChB,eAAe,mCAEb,MACA,UACA,gBACiB;CACjB,MAAM,MAAM,yCAAyC,MAAM,UAAU,cAAc;CACnF,yCAAoB,MAAM,KAAK,WAAW,KAAK,GAAG,CAAC;AACrD;AACF,wBAAQ,UAAU,wCAChB,eAAe,sCAEb,MACA,UACA,gBACwB;CACxB,MAAM,MAAM,yCAAyC,MAAM,UAAU,cAAc;CACnF,OAAO,KAAK,WAAW,QAAQ,GAAG;AACpC"}