Other Parts Discussed in Thread: DCA1000EVM,
Hello,
I'm using the IWR6843ISK+ICBOOST, DCA1000EVM, mmwave SDK v03.06.01.00-LTS.
I have a MATLAB script that I wish to translate into Python. However, I am uncertain about the data structure of these binary files that are used in these scripts.
I found in documention spruij4a.pdf (ti.com) page 20 the Stored File Format without sequence number.but it not clearly define the data that are used in the sdkHeader script or which binaries to use
Regarding the sdkHeader
class, is there any documentation available that explains the specified data structure in details ?and if there is any python scripts to read the header?
Below is a MATLAB script that defines classes for handling headers within these binary files:
Header script :
classdef Header < ti.rf_api.s.template %HEADER Summary of this class goes here % Detailed explanation goes here properties %(SetAccess=protected) dataCardHeader ti.rf_api.s.HSI.dataCardHeader = ti.rf_api.s.HSI.dataCardHeader sdkHeader (1,1) ti.rf_api.s.HSI.sdkHeader = ti.rf_api.s.HSI.sdkHeader paddingBuffer uint8 end methods function obj = Header(data) %HEADER Construct an instance of this class % Detailed explanation goes here if nargin==1 data = typecast(data, 'uint8'); if nargin==1 obj.dataCardHeader.set(data(1:16)); obj.sdkHeader.set(data(17:52)); end end obj.paddingBuffer = zeros(1,64-obj.size, 'uint8'); obj.paddingBuffer(:) = 0x0f; obj.setSize; end function s = getStruct(obj) s = struct('dataCardHeader',struct(obj.dataCardHeader), ... 'dataCardHeader_TotalLength', obj.dataCardHeader.length, ... 'sdkHeader', struct(obj.sdkHeader)); end end end
-----------------------
dataCardHeader script
classdef dataCardHeader < ti.rf_api.s.template %DATACARDHEADER Summary of this class goes here % Detailed explanation goes here properties %(SetAccess=protected) id (1,1) ti.rf_api.e.hsi.header.id = 0x0CDA0ADC0CDA0ADC totalLengthLSW (1,1) uint16 totalLengthMSW (1,1) uint16 reserved (1,1) uint32 end methods function obj = dataCardHeader(data) if nargin==1 try set(obj, data) catch ME whos('data') disp(data) warning(ME.message) end end end function len = length(obj) len = uint32(obj.totalLengthLSW) + uint32(obj.totalLengthMSW)*2^12; end end end
------------------------------
sdkHeader script
classdef sdkHeader < ti.rf_api.s.template %SDKHEADER Summary of this class goes here % Detailed explanation goes here properties version (1,1) uint16 headerSize (1,1) uint16 platform (1,1) ti.rf_api.e.hsi.platform = 4 interleavedMode (1,1) ti.rf_api.e.hsi.header.mode = 2 dataSize (1,1) ti.rf_api.e.hsi.header.size = 0 dataType (1,1) ti.rf_api.e.hsi.header.type = 2 rxChannelStatus (1,1) uint8 dataFormat (1,1) ti.rf_api.e.hsi.header.format = 1 chirpMode (1,1) uint16 adcDataSize (1,1) uint16 cpDataSize (1,1) uint16 cqDataSize (1,3) uint16 userBufSize (1,3) uint16 appExtensionHeader (1,8) uint8 end methods function obj = sdkHeader(data) %SDKHEADER Construct an instance of this class % Detailed explanation goes here if nargin==1 set(obj, data); end end function ver = getVersion(obj) ver = dec2base(obj.version, 8); ver = reshape([ver; '... '],1,[]); ver = ver(1:7); end end end
--------------
Regards