{"version":3,"file":"SetLowGrayPull.mjs","names":[],"sources":["../../generated/api/SetLowGrayPull.ts"],"sourcesContent":["import { ErrorType, Request, Session } from '@novastar/codec';\nimport AddressMapping from '../AddressMapping';\n\ndeclare module '@novastar/codec' {\n  interface API {\n    SetLowGrayPull(\n      addr: number,\n      portAddr: number,\n      scanBoardAddr: number,\n      bBroadcast: boolean,\n      data: number\n    ): Promise<void>;\n    trySetLowGrayPull(\n      addr: number,\n      portAddr: number,\n      scanBoardAddr: number,\n      data: number\n    ): Promise<ErrorType | null>;\n  }\n}\nexport default function createSetLowGrayPull<Broadcast extends boolean>(\n  addr: number,\n  portAddr: number,\n  scanBoardAddr: number,\n  bBroadcast: Broadcast,\n  data: number\n): Request<Broadcast> {\n  const req = new Request([data], bBroadcast, 'SetLowGrayPull');\n  req.destination = addr;\n  req.deviceType = 1;\n  req.port = portAddr;\n  req.rcvIndex = scanBoardAddr;\n  req.address = AddressMapping.ScannerLowGrayAddr;\n  return req;\n}\nSession.prototype.SetLowGrayPull = async function SetLowGrayPull(\n  this: Session,\n  addr: number,\n  portAddr: number,\n  scanBoardAddr: number,\n  bBroadcast: boolean,\n  data: number\n): Promise<void> {\n  const req = createSetLowGrayPull(addr, portAddr, scanBoardAddr, bBroadcast, data);\n  await this.connection.send(req);\n};\nSession.prototype.trySetLowGrayPull = async function trySetLowGrayPull(\n  this: Session,\n  addr: number,\n  portAddr: number,\n  scanBoardAddr: number,\n  data: number\n): Promise<ErrorType | null> {\n  const req = createSetLowGrayPull(addr, portAddr, scanBoardAddr, false, data);\n  return (await this.connection.trySend(req))?.ack ?? null;\n};\n"],"mappings":";;;;AAoBA,SAAwB,qBACtB,MACA,UACA,eACA,YACA,MACoB;CACpB,MAAM,MAAM,IAAI,QAAQ,CAAC,IAAI,GAAG,YAAY,gBAAgB;CAC5D,IAAI,cAAc;CAClB,IAAI,aAAa;CACjB,IAAI,OAAO;CACX,IAAI,WAAW;CACf,IAAI;CACJ,OAAO;AACT;AACA,QAAQ,UAAU,iBAAiB,eAAe,eAEhD,MACA,UACA,eACA,YACA,MACe;CACf,MAAM,MAAM,qBAAqB,MAAM,UAAU,eAAe,YAAY,IAAI;CAChF,MAAM,KAAK,WAAW,KAAK,GAAG;AAChC;AACA,QAAQ,UAAU,oBAAoB,eAAe,kBAEnD,MACA,UACA,eACA,MAC2B;CAC3B,MAAM,MAAM,qBAAqB,MAAM,UAAU,eAAe,OAAO,IAAI;CAC3E,QAAQ,MAAM,KAAK,WAAW,QAAQ,GAAG,IAAI,OAAO;AACtD"}