{"version":3,"file":"FuncCard_SetFuncCardFPGADescription.mjs","names":[],"sources":["../../generated/api/FuncCard_SetFuncCardFPGADescription.ts"],"sourcesContent":["import { ErrorType, Request, Session } from '@novastar/codec';\nimport AddressMapping from '../AddressMapping';\n\ndeclare module '@novastar/codec' {\n  interface API {\n    FuncCard_SetFuncCardFPGADescription(\n      addr: number,\n      bBroadcast: boolean,\n      funcCard_FPGADescription: number[] | Buffer\n    ): Promise<void>;\n    tryFuncCard_SetFuncCardFPGADescription(\n      addr: number,\n      funcCard_FPGADescription: number[] | Buffer\n    ): Promise<ErrorType | null>;\n  }\n}\nexport default function createFuncCard_SetFuncCardFPGADescription<Broadcast extends boolean>(\n  addr: number,\n  bBroadcast: Broadcast,\n  funcCard_FPGADescription: number[] | Buffer\n): Request<Broadcast> {\n  if (funcCard_FPGADescription.length !== AddressMapping.FuncCard_FPGADescriptionnOccupancy)\n    throw new TypeError(`Invalid buffer size: ${funcCard_FPGADescription.length}`);\n  const req = new Request(\n    funcCard_FPGADescription,\n    bBroadcast,\n    'FuncCard_SetFuncCardFPGADescription'\n  );\n  req.destination = addr;\n  req.address = AddressMapping.FuncCard_FPGADescriptionAddr;\n  return req;\n}\nSession.prototype.FuncCard_SetFuncCardFPGADescription =\n  async function FuncCard_SetFuncCardFPGADescription(\n    this: Session,\n    addr: number,\n    bBroadcast: boolean,\n    funcCard_FPGADescription: number[] | Buffer\n  ): Promise<void> {\n    const req = createFuncCard_SetFuncCardFPGADescription(\n      addr,\n      bBroadcast,\n      funcCard_FPGADescription\n    );\n    await this.connection.send(req);\n  };\nSession.prototype.tryFuncCard_SetFuncCardFPGADescription =\n  async function tryFuncCard_SetFuncCardFPGADescription(\n    this: Session,\n    addr: number,\n    funcCard_FPGADescription: number[] | Buffer\n  ): Promise<ErrorType | null> {\n    const req = createFuncCard_SetFuncCardFPGADescription(addr, false, funcCard_FPGADescription);\n    return (await this.connection.trySend(req))?.ack ?? null;\n  };\n"],"mappings":";;;;AAgBA,SAAwB,0CACtB,MACA,YACA,0BACoB;CACpB,IAAI,yBAAyB,gBAC3B,MAAM,IAAI,UAAU,wBAAwB,yBAAyB,QAAQ;CAC/E,MAAM,MAAM,IAAI,QACd,0BACA,YACA,qCACF;CACA,IAAI,cAAc;CAClB,IAAI;CACJ,OAAO;AACT;AACA,QAAQ,UAAU,sCAChB,eAAe,oCAEb,MACA,YACA,0BACe;CACf,MAAM,MAAM,0CACV,MACA,YACA,wBACF;CACA,MAAM,KAAK,WAAW,KAAK,GAAG;AAChC;AACF,QAAQ,UAAU,yCAChB,eAAe,uCAEb,MACA,0BAC2B;CAC3B,MAAM,MAAM,0CAA0C,MAAM,OAAO,wBAAwB;CAC3F,QAAQ,MAAM,KAAK,WAAW,QAAQ,GAAG,IAAI,OAAO;AACtD"}