Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

JSON

JohnNichols
Honored Contributor I
624 Views
				{
					"lsm6dsv16x_acc": {
						"c_type": 0,
						"data_type": "int16",
						"dim": 3,
						"enable": true,
						"ep_id": 1,
						"fs": 3,
						"ioffset": 0.3493388891220093,
						"measodr": 7443.77197265625,
						"odr": 10,
						"samples_per_ts": 1000,
						"sd_dps": 15360,
						"sensitivity": 0.0004879999905824661,
						"sensor_annotation": "",
						"sensor_category": 0,
						"st_ble_stream": {
							"acc": {
								"channels": 3,
								"elements": 40,
								"enable": false,
								"format": "int16_t",
								"multiply_factor": 0.0004879999905824661,
								"odr": 666,
								"unit": "g"
							},
							"id": 0
						},
						"stream_id": 1,
						"usb_dps": 2304
					}
				},

I am trying to input a binary file and then output the signal as double precision.   Any idea what the term elements means?  

0 Kudos
6 Replies
Steve_Lionel
Honored Contributor III
616 Views

John, what does this have to do with Intel Fortran? You'd have to consult the documentation for whatever device created this to know what the various fields mean. The whole point of JSON is that it's a generic structure.

0 Kudos
JohnNichols
Honored Contributor I
582 Views

Intel Fortran

The program is written in Intel Fortran. 

The device belongs to ST Microelectronics, a week ago I asked my first question, two days later my second, four days later the same questions, and just before I posted it here, I asked again on their Forum, which is a challenge.  I sent two private messages. 

ST Microelectronics zip  Intel Fortran Forum == 2,  

number of time-domain samples per channel  - I though maybe that and after I posted the question, I thought divide the number of known numbers into the number of bytes and that might help.  

 

 

0 Kudos
JohnNichols
Honored Contributor I
511 Views

Is there a way to find out what the routines are inside a C++ dll and then call them from Fortran.  

0 Kudos
andrew_4619
Honored Contributor III
507 Views
Dumpbin with the correct options will give the routines either by name or ordinal. But you need to know the API to call them
0 Kudos
witwald
New Contributor II
607 Views

Hi @JohnNichols . It's nice to see you using Fortran to try to decode and process these binary data signals. My guess is that "elements" might be the number of time-domain samples per channel that are bundled together and sent as one BLE (Bluetooth Low Energy) stream block. This approach would send the data in batches to save power.

0 Kudos
Steve_Lionel
Honored Contributor III
499 Views

dumpbin -exports , but you also would need to use LoadLibrary and GetProcAddress unless you managed to create an export library from the DLL (or used a .DEF file).

0 Kudos
Reply