{"version":3,"file":"Distribute_ReadDistributeFPGADescription.cjs","names":["Request"],"sources":["../../generated/api/Distribute_ReadDistributeFPGADescription.ts"],"sourcesContent":["import { Packet, Request, Session } from '@novastar/codec';\nimport AddressMapping from '../AddressMapping';\n\ndeclare module '@novastar/codec' {\n  interface API {\n    Distribute_ReadDistributeFPGADescription(\n      addr: number,\n      portAddr: number,\n      distributeAddr: number\n    ): Promise<Buffer>;\n    tryDistribute_ReadDistributeFPGADescription(\n      addr: number,\n      portAddr: number,\n      distributeAddr: number\n    ): Promise<Packet | null>;\n  }\n}\nexport default function createDistribute_ReadDistributeFPGADescription(\n  addr: number,\n  portAddr: number,\n  distributeAddr: number\n): Request {\n  const req = new Request(\n    AddressMapping.Distribute_FPGADescriptionnOccupancy,\n    'Distribute_ReadDistributeFPGADescription'\n  );\n  req.destination = addr;\n  req.deviceType = 3;\n  req.port = portAddr;\n  req.rcvIndex = distributeAddr;\n  req.address = AddressMapping.Distribute_FPGADescriptionAddr;\n  return req;\n}\nSession.prototype.Distribute_ReadDistributeFPGADescription =\n  async function Distribute_ReadDistributeFPGADescription(\n    this: Session,\n    addr: number,\n    portAddr: number,\n    distributeAddr: number\n  ): Promise<Buffer> {\n    const req = createDistribute_ReadDistributeFPGADescription(addr, portAddr, distributeAddr);\n    return (await this.connection.send(req)).data;\n  };\nSession.prototype.tryDistribute_ReadDistributeFPGADescription =\n  async function tryDistribute_ReadDistributeFPGADescription(\n    this: Session,\n    addr: number,\n    portAddr: number,\n    distributeAddr: number\n  ): Promise<Packet | null> {\n    const req = createDistribute_ReadDistributeFPGADescription(addr, portAddr, distributeAddr);\n    return this.connection.trySend(req);\n  };\n"],"mappings":";;;;;AAiBA,SAAwB,+CACtB,MACA,UACA,gBACS;CACT,MAAM,MAAM,IAAIA,6BAEd,0CACF;CACA,IAAI,cAAc;CAClB,IAAI,aAAa;CACjB,IAAI,OAAO;CACX,IAAI,WAAW;CACf,IAAI;CACJ,OAAO;AACT;AACA,wBAAQ,UAAU,2CAChB,eAAe,yCAEb,MACA,UACA,gBACiB;CACjB,MAAM,MAAM,+CAA+C,MAAM,UAAU,cAAc;CACzF,QAAQ,MAAM,KAAK,WAAW,KAAK,GAAG,GAAG;AAC3C;AACF,wBAAQ,UAAU,8CAChB,eAAe,4CAEb,MACA,UACA,gBACwB;CACxB,MAAM,MAAM,+CAA+C,MAAM,UAAU,cAAc;CACzF,OAAO,KAAK,WAAW,QAAQ,GAAG;AACpC"}