MCPcopy Create free account
hub / github.com/IQEngine/IQEngine / getIQDataBlocks

Method getIQDataBlocks

client/src/api/iqdata/BlobClient.ts:44–70  ·  view source on GitHub ↗
(
    meta: SigMFMetadata,
    indexes: number[],
    blockSize: number,
    signal: AbortSignal
  )

Source from the content-addressed store, hash-verified

42 }
43
44 async getIQDataBlocks(
45 meta: SigMFMetadata,
46 indexes: number[],
47 blockSize: number,
48 signal: AbortSignal
49 ): Promise<IQDataSlice[]> {
50 console.debug('getIQDataBlocks', indexes);
51 const contiguousIndexes = groupContiguousIndexes(indexes);
52 let { account, container, file_path } = meta.getOrigin();
53 // if filePath does not finish in .sigmf-data, add it
54 if (!file_path.endsWith('.sigmf-data')) {
55 file_path += '.sigmf-data';
56 }
57 const content = await Promise.all(
58 contiguousIndexes.map((indexGroup) =>
59 this.getIQDataBlockFromBlob(
60 getBlobClient(this.dataSources, account, container, file_path),
61 meta,
62 indexGroup.start,
63 indexGroup.count,
64 blockSize,
65 signal
66 )
67 )
68 );
69 return content.flat();
70 }
71
72 async getIQDataBlockFromBlob(
73 blobClient: AzureBlobClient,

Callers

nothing calls this directly

Calls 4

groupContiguousIndexesFunction · 0.90
getBlobClientFunction · 0.90
getOriginMethod · 0.80

Tested by

no test coverage detected