How to read data from a measurement device? - communication

I need to read data from a measurement device and then save them in a file.
In this photo there is a list of commands (with check_sum that I don't know where to get) I can use for the communication:
Command List
Any help on how can I do that?

Related

What is the data contained in ROS topic velodyne_msgs/VelodynePacket Message?

I am doing a light weight program to monitor received beams for lidar. Preferably, I do not want to cache the entire UDP data packet or point cloud data due to the light weight nature.
The question is what is the data contained in ROS message velodyne_msgs/VelodynePacket. This message contains smaller data but I do not know if it is related.
By read the Ros Wiki on this topic but the link for velodynepackt did not provide useful info on the content.
Check the message definition to see what fields a message contains and their types. Message files will usually either have field names that are self explanatory or will have comments (## text) describing the fields. You can look at the message definitions either online or locally. To look at them locally use roscd to get to the package directory roscd <package_name>/msg and then using cat to see the contents of the message file. In your case, this would be:
roscd velodyne_msgs/msg
cat VelodynePacket.msg
cat VelodyneScan.msg
The relevant message files are available online from the page you linked to:
http://docs.ros.org/api/velodyne_msgs/html/msg/VelodyneScan.html
http://docs.ros.org/api/velodyne_msgs/html/msg/VelodynePacket.html
In regards to your specific question about creating a lightweight application, you have a few options.
Use the provided ROS message and subscribe to it. Most of the time if you don't have a ton of large data traveling around, you'll be okay and will be able to keep up with real time data. The majority of the time associated with ROS usually comes from the network transport, so if that's a problem, you'll need to not pass the data over ROS.
Put your code in a ROS Nodelet. This gives you the advantages of ROS data abstractions while eliminating the network data transfer that occurs between nodes. This is akin to using a pointer to the data field.
If you really don't want all the scan data, but still want to use ROS, you can write your own driver node. This will read from the LIDAR the data you want and discard the data you don't. You can do the raw data processing in that node (no ROS message required) or publish the data you care about and do the processing in another node.

Storing data coming form cupcarbon into database

I am creating an IoT simulation using Cupcarbon IoT simulator. I want to store the simulation data in some database. Anyone, please help me how to do that.
A simple solution could be to use the command printfile.
With this command you will able to store in the file with the name results some data you will choose. Every sensor node could have its own result file.
Hope this works for you.
I would love to ready if you found another solution.
BR

How to aggregate telemetry data from different devices contained in one asset?

I'm working with Thingsboard Community Edition 2.0.
I have one asset that contains two different devices. Both devices send telemetry data with the same key. I want to be able to show the sum of both values as the total for the asset.
Did anyone figure out how to do it?
Thanks.
The idea is basically to create a memory attribute containing a JSON of the data you want to save.
It's not straight forward but i found a way that works to do it.
Main steps :
Change originator to asset.
Each time telemetry comes, use enrichment to get the attribute memory, then with a script node put if from metadata to msg.
Merge the memory and the incomming telemetry (replace old value with new ones)
Compute what you want (min, max, mean, standard deviation, sum, etc...) and save it in telemetry or attribute.
Save in parallel the merged memory (note you can't save JS objects in telemetry or attributes, you have to use JSON.stringify() to save it and JSON.parse to take it back using enrichment node.
Hope it helps
Corentin

ThingsBoard use case with virtual devices

I have devices. And the devices are sending raw sensor values to a data collection service. The data collection service persists all sensor events grouped by sensor id and set id.
Now I want to use ThingsBoard to visualize the data.
Is it possible to create virtual devices in ThingsBoard? Each virtual device should represent a sensor and get the data from the existing persistent storage. And I dont want to get all sensor values for all devices. But I want to select a device and a set and then visualize only these values. The data should not be stored in the embedded Cassandra database. Is it possible to load the selected data only in memory? Everytime I select any data, ThingsBoard should pull the selected data again. Or an extra servcie should push the data again.
Devices can be virtual or physical. You need a method to post data to TB. If it's a software its OK, TB don't care about that.
When you create devices, you can create dashboards that can interact with devices data. You select what devices you want to use.
Unfortunately you need to save the data in the database. You cant show anything in dashboard if is not stored.

How can one get readable data(JSON, XML format or any other format) from Medical Equipments like Cardiac or heart monitors, Pulse oximeter?

I am new to this domain and i want to know that how can one interact with medical equipments to get readable data to get saved into the SQL Database? So, that one can maintain the data on Server.
Thanks in advance.
I think, you are looking for this API.
It is provided by FDA.
openFDA Unique Device Identifier
The unique device identification system was established to identify devices through distribution and use. Device labelers are required to include a unique device identifier (UDI) on device labels and packages. The Global Unique Device Identification Database (GUDID) contains key device identification information submitted to the FDA.
It will depend on the equipment. It's very likely you will need a separate module to retrieve data from the device and converting it back to json or xml.
You will have to check every equipment vendor you have!
I would suggest creating an interface in code and implement one per device. Then the code which converts to json / xml and / or saves to database does not need to be aware of the specific device it's being used.

Resources