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