View source: R/inspect_binFile_brand.R
| inspect_binFile_brand | R Documentation |
This function identifies the brand of a device (e.g., GENEActiv or MATRIX) based on the contents of a binary file. If the file is unrecognized, it returns a default value indicating the device is not recognized.
inspect_binFile_brand(filename)
filename |
The path to the binary file to be inspected. |
The function performs the following steps:
Reads the file header to check for the presence of a "Device Type" field.
If the device type contains the string "GENEActiv", the device is identified as a GENEActiv device.
If the "Device Type" field is not found, it checks for a MATRIX device by validating a specific header value ("MDTC").
If neither device type is detected, the function returns "not_recognised".
A character string representing the detected device brand:
2: Indicates the device is a GENEActiv device.
7: Indicates the device is a MATRIX device.
"not_recognised": Indicates the file's brand is not recognized.
Jairo H Migueles <jairo@jhmigueles.com>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.