{"version":3,"file":"FuncCard_SetRebootBootFpgaProgram_1.mjs","names":[],"sources":["../../generated/api/FuncCard_SetRebootBootFpgaProgram_1.ts"],"sourcesContent":["import { encodeUIntLE, ErrorType, Request, Session } from '@novastar/codec';\nimport AddressMapping from '../AddressMapping';\n\ndeclare module '@novastar/codec' {\n  interface API {\n    FuncCard_SetRebootBootFpgaProgram_1(\n      addr: number,\n      portAddr: number,\n      funcCardAddr: number,\n      bBroadcast: boolean,\n      funcCardModle: number\n    ): Promise<void>;\n    tryFuncCard_SetRebootBootFpgaProgram_1(\n      addr: number,\n      portAddr: number,\n      funcCardAddr: number,\n      funcCardModle: number\n    ): Promise<ErrorType | null>;\n  }\n}\nexport default function createFuncCard_SetRebootBootFpgaProgram_1<Broadcast extends boolean>(\n  addr: number,\n  portAddr: number,\n  funcCardAddr: number,\n  bBroadcast: Broadcast,\n  funcCardModle: number\n): Request<Broadcast> {\n  const $data = encodeUIntLE(funcCardModle, AddressMapping.FuncCard_RebootBootFpgaProgramOccupancy);\n  const req = new Request($data, bBroadcast, 'FuncCard_SetRebootBootFpgaProgram_1');\n  req.destination = addr;\n  req.deviceType = 2;\n  req.port = portAddr;\n  req.rcvIndex = funcCardAddr;\n  req.address = AddressMapping.FuncCard_RebootBootFpgaProgramAddr;\n  return req;\n}\nSession.prototype.FuncCard_SetRebootBootFpgaProgram_1 =\n  async function FuncCard_SetRebootBootFpgaProgram_1(\n    this: Session,\n    addr: number,\n    portAddr: number,\n    funcCardAddr: number,\n    bBroadcast: boolean,\n    funcCardModle: number\n  ): Promise<void> {\n    const req = createFuncCard_SetRebootBootFpgaProgram_1(\n      addr,\n      portAddr,\n      funcCardAddr,\n      bBroadcast,\n      funcCardModle\n    );\n    await this.connection.send(req);\n  };\nSession.prototype.tryFuncCard_SetRebootBootFpgaProgram_1 =\n  async function tryFuncCard_SetRebootBootFpgaProgram_1(\n    this: Session,\n    addr: number,\n    portAddr: number,\n    funcCardAddr: number,\n    funcCardModle: number\n  ): Promise<ErrorType | null> {\n    const req = createFuncCard_SetRebootBootFpgaProgram_1(\n      addr,\n      portAddr,\n      funcCardAddr,\n      false,\n      funcCardModle\n    );\n    return (await this.connection.trySend(req))?.ack ?? null;\n  };\n"],"mappings":";;;;AAoBA,SAAwB,0CACtB,MACA,UACA,cACA,YACA,eACoB;CAEpB,MAAM,MAAM,IAAI,QADF,aAAa,gBACC,GAAG,YAAY,qCAAqC;CAChF,IAAI,cAAc;CAClB,IAAI,aAAa;CACjB,IAAI,OAAO;CACX,IAAI,WAAW;CACf,IAAI;CACJ,OAAO;AACT;AACA,QAAQ,UAAU,sCAChB,eAAe,oCAEb,MACA,UACA,cACA,YACA,eACe;CACf,MAAM,MAAM,0CACV,MACA,UACA,cACA,YACA,aACF;CACA,MAAM,KAAK,WAAW,KAAK,GAAG;AAChC;AACF,QAAQ,UAAU,yCAChB,eAAe,uCAEb,MACA,UACA,cACA,eAC2B;CAC3B,MAAM,MAAM,0CACV,MACA,UACA,cACA,OACA,aACF;CACA,QAAQ,MAAM,KAAK,WAAW,QAAQ,GAAG,IAAI,OAAO;AACtD"}