{"version":3,"file":"ReadSupportDeviceTableTag.cjs","names":["Request"],"sources":["../../generated/api/ReadSupportDeviceTableTag.ts"],"sourcesContent":["import { decodeUIntLE, Packet, Request, Session } from '@novastar/codec';\nimport AddressMapping from '../AddressMapping';\n\ndeclare module '@novastar/codec' {\n  interface API {\n    ReadSupportDeviceTableTag(addr: number): Promise<number>;\n    tryReadSupportDeviceTableTag(addr: number): Promise<Packet | null>;\n  }\n}\nexport default function createReadSupportDeviceTableTag(addr: number): Request {\n  const req = new Request(AddressMapping.SupportDeviceTableOccupancy, 'ReadSupportDeviceTableTag');\n  req.destination = addr;\n  req.address = AddressMapping.SupportDeviceTableAddr;\n  return req;\n}\nSession.prototype.ReadSupportDeviceTableTag = async function ReadSupportDeviceTableTag(\n  this: Session,\n  addr: number\n): Promise<number> {\n  const req = createReadSupportDeviceTableTag(addr);\n  return decodeUIntLE(await this.connection.send(req));\n};\nSession.prototype.tryReadSupportDeviceTableTag = async function tryReadSupportDeviceTableTag(\n  this: Session,\n  addr: number\n): Promise<Packet | null> {\n  const req = createReadSupportDeviceTableTag(addr);\n  return this.connection.trySend(req);\n};\n"],"mappings":";;;;;AASA,SAAwB,gCAAgC,MAAuB;CAC7E,MAAM,MAAM,IAAIA,2BAAoD,2BAA2B;CAC/F,IAAI,cAAc;CAClB,IAAI;CACJ,OAAO;AACT;AACA,wBAAQ,UAAU,4BAA4B,eAAe,0BAE3D,MACiB;CACjB,MAAM,MAAM,gCAAgC,IAAI;CAChD,yCAAoB,MAAM,KAAK,WAAW,KAAK,GAAG,CAAC;AACrD;AACA,wBAAQ,UAAU,+BAA+B,eAAe,6BAE9D,MACwB;CACxB,MAAM,MAAM,gCAAgC,IAAI;CAChD,OAAO,KAAK,WAAW,QAAQ,GAAG;AACpC"}