{"version":3,"file":"FuncCard_SetStoreFpgaBootProgram.cjs","names":["Request"],"sources":["../../generated/api/FuncCard_SetStoreFpgaBootProgram.ts"],"sourcesContent":["import { encodeUIntLE, ErrorType, Request, Session } from '@novastar/codec';\nimport AddressMapping from '../AddressMapping';\n\ndeclare module '@novastar/codec' {\n  interface API {\n    FuncCard_SetStoreFpgaBootProgram(\n      addr: number,\n      bBroadcast: boolean,\n      funcCardModle: number\n    ): Promise<void>;\n    tryFuncCard_SetStoreFpgaBootProgram(\n      addr: number,\n      funcCardModle: number\n    ): Promise<ErrorType | null>;\n  }\n}\nexport default function createFuncCard_SetStoreFpgaBootProgram<Broadcast extends boolean>(\n  addr: number,\n  bBroadcast: Broadcast,\n  funcCardModle: number\n): Request<Broadcast> {\n  const $data = encodeUIntLE(funcCardModle, AddressMapping.FuncCard_StoreFpgaBootProgramOccupancy);\n  const req = new Request($data, bBroadcast, 'FuncCard_SetStoreFpgaBootProgram');\n  req.destination = addr;\n  req.address = AddressMapping.FuncCard_StoreFpgaBootProgramAddr;\n  return req;\n}\nSession.prototype.FuncCard_SetStoreFpgaBootProgram =\n  async function FuncCard_SetStoreFpgaBootProgram(\n    this: Session,\n    addr: number,\n    bBroadcast: boolean,\n    funcCardModle: number\n  ): Promise<void> {\n    const req = createFuncCard_SetStoreFpgaBootProgram(addr, bBroadcast, funcCardModle);\n    await this.connection.send(req);\n  };\nSession.prototype.tryFuncCard_SetStoreFpgaBootProgram =\n  async function tryFuncCard_SetStoreFpgaBootProgram(\n    this: Session,\n    addr: number,\n    funcCardModle: number\n  ): Promise<ErrorType | null> {\n    const req = createFuncCard_SetStoreFpgaBootProgram(addr, false, funcCardModle);\n    return (await this.connection.trySend(req))?.ack ?? null;\n  };\n"],"mappings":";;;;;AAgBA,SAAwB,uCACtB,MACA,YACA,eACoB;CAEpB,MAAM,MAAM,IAAIA,0DADW,gBACC,GAAG,YAAY,kCAAkC;CAC7E,IAAI,cAAc;CAClB,IAAI;CACJ,OAAO;AACT;AACA,wBAAQ,UAAU,mCAChB,eAAe,iCAEb,MACA,YACA,eACe;CACf,MAAM,MAAM,uCAAuC,MAAM,YAAY,aAAa;CAClF,MAAM,KAAK,WAAW,KAAK,GAAG;AAChC;AACF,wBAAQ,UAAU,sCAChB,eAAe,oCAEb,MACA,eAC2B;CAC3B,MAAM,MAAM,uCAAuC,MAAM,OAAO,aAAa;CAC7E,QAAQ,MAAM,KAAK,WAAW,QAAQ,GAAG,IAAI,OAAO;AACtD"}