{"version":3,"file":"SetBlankingTime5253Value.mjs","names":[],"sources":["../../generated/api/SetBlankingTime5253Value.ts"],"sourcesContent":["import { ErrorType, Request, Session } from '@novastar/codec';\nimport AddressMapping from '../AddressMapping';\n\ndeclare module '@novastar/codec' {\n  interface API {\n    SetBlankingTime5253Value(\n      addr: number,\n      portAddr: number,\n      scanBoardAddr: number,\n      bBroadcast: boolean,\n      BlankingTime5253Value: number[] | Buffer\n    ): Promise<void>;\n    trySetBlankingTime5253Value(\n      addr: number,\n      portAddr: number,\n      scanBoardAddr: number,\n      BlankingTime5253Value: number[] | Buffer\n    ): Promise<ErrorType | null>;\n  }\n}\nexport default function createSetBlankingTime5253Value<Broadcast extends boolean>(\n  addr: number,\n  portAddr: number,\n  scanBoardAddr: number,\n  bBroadcast: Broadcast,\n  BlankingTime5253Value: number[] | Buffer\n): Request<Broadcast> {\n  if (BlankingTime5253Value.length !== AddressMapping.BlankingTime5253Occupancy)\n    throw new TypeError(`Invalid buffer size: ${BlankingTime5253Value.length}`);\n  const req = new Request(BlankingTime5253Value, bBroadcast, 'SetBlankingTime5253Value');\n  req.destination = addr;\n  req.deviceType = 1;\n  req.port = portAddr;\n  req.rcvIndex = scanBoardAddr;\n  req.address = AddressMapping.BlankingTime5253Addr;\n  return req;\n}\nSession.prototype.SetBlankingTime5253Value = async function SetBlankingTime5253Value(\n  this: Session,\n  addr: number,\n  portAddr: number,\n  scanBoardAddr: number,\n  bBroadcast: boolean,\n  BlankingTime5253Value: number[] | Buffer\n): Promise<void> {\n  const req = createSetBlankingTime5253Value(\n    addr,\n    portAddr,\n    scanBoardAddr,\n    bBroadcast,\n    BlankingTime5253Value\n  );\n  await this.connection.send(req);\n};\nSession.prototype.trySetBlankingTime5253Value = async function trySetBlankingTime5253Value(\n  this: Session,\n  addr: number,\n  portAddr: number,\n  scanBoardAddr: number,\n  BlankingTime5253Value: number[] | Buffer\n): Promise<ErrorType | null> {\n  const req = createSetBlankingTime5253Value(\n    addr,\n    portAddr,\n    scanBoardAddr,\n    false,\n    BlankingTime5253Value\n  );\n  return (await this.connection.trySend(req))?.ack ?? null;\n};\n"],"mappings":";;;;AAoBA,SAAwB,+BACtB,MACA,UACA,eACA,YACA,uBACoB;CACpB,IAAI,sBAAsB,cACxB,MAAM,IAAI,UAAU,wBAAwB,sBAAsB,QAAQ;CAC5E,MAAM,MAAM,IAAI,QAAQ,uBAAuB,YAAY,0BAA0B;CACrF,IAAI,cAAc;CAClB,IAAI,aAAa;CACjB,IAAI,OAAO;CACX,IAAI,WAAW;CACf,IAAI;CACJ,OAAO;AACT;AACA,QAAQ,UAAU,2BAA2B,eAAe,yBAE1D,MACA,UACA,eACA,YACA,uBACe;CACf,MAAM,MAAM,+BACV,MACA,UACA,eACA,YACA,qBACF;CACA,MAAM,KAAK,WAAW,KAAK,GAAG;AAChC;AACA,QAAQ,UAAU,8BAA8B,eAAe,4BAE7D,MACA,UACA,eACA,uBAC2B;CAC3B,MAAM,MAAM,+BACV,MACA,UACA,eACA,OACA,qBACF;CACA,QAAQ,MAAM,KAAK,WAAW,QAAQ,GAAG,IAAI,OAAO;AACtD"}