{"version":3,"file":"FuncCard_ReadPowerCtrlMode.mjs","names":[],"sources":["../../generated/api/FuncCard_ReadPowerCtrlMode.ts"],"sourcesContent":["import { decodeUIntLE, Packet, Request, Session } from '@novastar/codec';\nimport AddressMapping from '../AddressMapping';\n\ndeclare module '@novastar/codec' {\n  interface API {\n    FuncCard_ReadPowerCtrlMode(addr: number): Promise<number>;\n    tryFuncCard_ReadPowerCtrlMode(addr: number): Promise<Packet | null>;\n  }\n}\nexport default function createFuncCard_ReadPowerCtrlMode(addr: number): Request {\n  const req = new Request(\n    AddressMapping.FuncCard_PowerCtrlModeOccupancy,\n    'FuncCard_ReadPowerCtrlMode'\n  );\n  req.destination = addr;\n  req.address = AddressMapping.FuncCard_PowerCtrlModeAddr;\n  return req;\n}\nSession.prototype.FuncCard_ReadPowerCtrlMode = async function FuncCard_ReadPowerCtrlMode(\n  this: Session,\n  addr: number\n): Promise<number> {\n  const req = createFuncCard_ReadPowerCtrlMode(addr);\n  return decodeUIntLE(await this.connection.send(req));\n};\nSession.prototype.tryFuncCard_ReadPowerCtrlMode = async function tryFuncCard_ReadPowerCtrlMode(\n  this: Session,\n  addr: number\n): Promise<Packet | null> {\n  const req = createFuncCard_ReadPowerCtrlMode(addr);\n  return this.connection.trySend(req);\n};\n"],"mappings":";;;;AASA,SAAwB,iCAAiC,MAAuB;CAC9E,MAAM,MAAM,IAAI,WAEd,4BACF;CACA,IAAI,cAAc;CAClB,IAAI;CACJ,OAAO;AACT;AACA,QAAQ,UAAU,6BAA6B,eAAe,2BAE5D,MACiB;CACjB,MAAM,MAAM,iCAAiC,IAAI;CACjD,OAAO,aAAa,MAAM,KAAK,WAAW,KAAK,GAAG,CAAC;AACrD;AACA,QAAQ,UAAU,gCAAgC,eAAe,8BAE/D,MACwB;CACxB,MAAM,MAAM,iCAAiC,IAAI;CACjD,OAAO,KAAK,WAAW,QAAQ,GAAG;AACpC"}