{"version":3,"file":"ReadAllPortHeight.cjs","names":["Request"],"sources":["../../generated/api/ReadAllPortHeight.ts"],"sourcesContent":["import { Packet, Request, Session } from '@novastar/codec';\nimport AddressMapping from '../AddressMapping';\n\ndeclare module '@novastar/codec' {\n  interface API {\n    ReadAllPortHeight(addr: number): Promise<Buffer>;\n    tryReadAllPortHeight(addr: number): Promise<Packet | null>;\n  }\n}\nexport default function createReadAllPortHeight(addr: number): Request {\n  const req = new Request(AddressMapping.Sender_AllDataSpaceOccupancy, 'ReadAllPortHeight');\n  req.destination = addr;\n  req.address = AddressMapping.Sender_AllDataAddr;\n  return req;\n}\nSession.prototype.ReadAllPortHeight = async function ReadAllPortHeight(\n  this: Session,\n  addr: number\n): Promise<Buffer> {\n  const req = createReadAllPortHeight(addr);\n  return (await this.connection.send(req)).data;\n};\nSession.prototype.tryReadAllPortHeight = async function tryReadAllPortHeight(\n  this: Session,\n  addr: number\n): Promise<Packet | null> {\n  const req = createReadAllPortHeight(addr);\n  return this.connection.trySend(req);\n};\n"],"mappings":";;;;;AASA,SAAwB,wBAAwB,MAAuB;CACrE,MAAM,MAAM,IAAIA,6BAAqD,mBAAmB;CACxF,IAAI,cAAc;CAClB,IAAI;CACJ,OAAO;AACT;AACA,wBAAQ,UAAU,oBAAoB,eAAe,kBAEnD,MACiB;CACjB,MAAM,MAAM,wBAAwB,IAAI;CACxC,QAAQ,MAAM,KAAK,WAAW,KAAK,GAAG,GAAG;AAC3C;AACA,wBAAQ,UAAU,uBAAuB,eAAe,qBAEtD,MACwB;CACxB,MAAM,MAAM,wBAAwB,IAAI;CACxC,OAAO,KAAK,WAAW,QAAQ,GAAG;AACpC"}