{"version":3,"file":"FuncCard_SetStoreFpgaAppProgram.mjs","names":[],"sources":["../../generated/api/FuncCard_SetStoreFpgaAppProgram.ts"],"sourcesContent":["import { encodeUIntLE, ErrorType, Request, Session } from '@novastar/codec';\nimport AddressMapping from '../AddressMapping';\n\ndeclare module '@novastar/codec' {\n  interface API {\n    FuncCard_SetStoreFpgaAppProgram(\n      addr: number,\n      bBroadcast: boolean,\n      funcCardModle: number\n    ): Promise<void>;\n    tryFuncCard_SetStoreFpgaAppProgram(\n      addr: number,\n      funcCardModle: number\n    ): Promise<ErrorType | null>;\n  }\n}\nexport default function createFuncCard_SetStoreFpgaAppProgram<Broadcast extends boolean>(\n  addr: number,\n  bBroadcast: Broadcast,\n  funcCardModle: number\n): Request<Broadcast> {\n  const $data = encodeUIntLE(funcCardModle, AddressMapping.FuncCard_StoreFpgaAppProgramOccupancy);\n  const req = new Request($data, bBroadcast, 'FuncCard_SetStoreFpgaAppProgram');\n  req.destination = addr;\n  req.address = AddressMapping.FuncCard_StoreFpgaAppProgramAddr;\n  return req;\n}\nSession.prototype.FuncCard_SetStoreFpgaAppProgram = async function FuncCard_SetStoreFpgaAppProgram(\n  this: Session,\n  addr: number,\n  bBroadcast: boolean,\n  funcCardModle: number\n): Promise<void> {\n  const req = createFuncCard_SetStoreFpgaAppProgram(addr, bBroadcast, funcCardModle);\n  await this.connection.send(req);\n};\nSession.prototype.tryFuncCard_SetStoreFpgaAppProgram =\n  async function tryFuncCard_SetStoreFpgaAppProgram(\n    this: Session,\n    addr: number,\n    funcCardModle: number\n  ): Promise<ErrorType | null> {\n    const req = createFuncCard_SetStoreFpgaAppProgram(addr, false, funcCardModle);\n    return (await this.connection.trySend(req))?.ack ?? null;\n  };\n"],"mappings":";;;;AAgBA,SAAwB,sCACtB,MACA,YACA,eACoB;CAEpB,MAAM,MAAM,IAAI,QADF,aAAa,gBACC,GAAG,YAAY,iCAAiC;CAC5E,IAAI,cAAc;CAClB,IAAI;CACJ,OAAO;AACT;AACA,QAAQ,UAAU,kCAAkC,eAAe,gCAEjE,MACA,YACA,eACe;CACf,MAAM,MAAM,sCAAsC,MAAM,YAAY,aAAa;CACjF,MAAM,KAAK,WAAW,KAAK,GAAG;AAChC;AACA,QAAQ,UAAU,qCAChB,eAAe,mCAEb,MACA,eAC2B;CAC3B,MAAM,MAAM,sCAAsC,MAAM,OAAO,aAAa;CAC5E,QAAQ,MAAM,KAAK,WAAW,QAAQ,GAAG,IAAI,OAAO;AACtD"}