The Gravio platform provides an easy way of adding new sensors to the infrastructure. So called SDD files (Serial Data Definition) describe how serial data should be interpreted and parametrised by Gravio. Here you can learn about how to create such SDD files.

Note: SDD files are specific to a particular manufacturer. So if you like to create an SDD file for a manufacturer or standard that isn’t yet supported by Gravio, please let us know via support@gravio.com and we will investigate the support of the new device range.

As of April 2019, we support EnOcean devices for custom SDD creation.

Step-by-step Creation of an SDD File
Sample Data:

Data Length and Expected Data:

In this document, we talk about the SDD file structure and creating sample SDD files using the data structure above.

The SDD file allows Gravio to register a serial device, or in this case a serial device’s sensor, and give instructions as to how to interpret the data received from a serial device.

SDD Basic Structure

The SDD file is a valid JSON file. The basic structure looks like this:

{
  "Name": "Device Name",
  "DataPoints": [],
  "DataPackageSpec": {
    "Fields": [],
    "Validations": [],
    "Mappings": []
  }
}

We will discuss each portion of this structure as we go along this document.

DataPackageSpec

"DataPackageSpec": {}

The DataPackage spec contains the information needed for Gravio to understand the format of the packet sent by the device. Serial data is usually very detailed and the SDD file allows us to handle virtually any kind of data.

In order to create the DataPackageSpec for this device, we only need the above sample data as a guide.

Name Node

This is the identifier for the device to register to Gravio. You may choose your own name for the device, but the name for must also be the same name for the SDD file. We will choose our own name for the three SDD files based on the function:

Door:

  "Name": “SampleDoor”,

Temp:

 "Name": “SampleTemperature”,

Accelerometer:

 "Name": “SampleAccelerometer”,

[Spec]

The name specified in Name must be the same as the SDD file name

The DataPoints node comes next, but since it depends on another feature of this JSON structure, we will discuss DataPoints after we have covered that.

DataPackageSpec – Fields

"DataPackageSpec": {
    "Fields": [],
  }

Fields can define each field of the message packet.

The first three fields (Head, Type, and DataLength) of the sample message packet are all 1 byte fixed size. We define these three as constants.

  {
    "Name": “Head”,
    "Size": {
      "SizeType": "Constant",
      "Size": 1
    }
  },
  {
    "Name": “Type",
    "Size": {
      "SizeType": "Constant",
      "Size": 1
    }
  },
  {
    "Name": “DataLength",
    "Size": {
      "SizeType": "Constant",
      "Size": 1
    }
  }

The next Data field is the payload. Since the size is variable by the value of the DataLength field, use the DataLength field as a reference for the payload size.

  {
    "Name": “Data",
    "Size": {
      "SizeType": “Reference",
      "SizeRef": "DataLength"
    }
  }

The remaining fields of the message packet, including the Foot field and the CRC field, are also defined as a 1-byte constant.

  {
    "Name": “Foot",
    "Size": {
      "SizeType": "Constant",
      "Size": 1
    }
  },
  {
    "Name": “CRC”,
    "Size": {
      "SizeType": "Constant",
      "Size": 1
    }
  }

All three SDD files in the sample have the same message packet structure, so these fields are all common, but the Data fields are different in size.

[Spec]

Fields define a name by Name and refer to Validations and Mappings.
Although Size defines the number of bytes in the field, specifying Constant as SizeType uses the value of Size as a constant. In addition to Constant, you can specify Reference, Calculated, Optional, BitEnum, and BitReference.
When Reference is specified for SizeType, the value of the field specified by SizeRef is used.
When Calculated is specified for SizeType, Size is calculated by subtracting the sum of the Sizes in the array specified by Subtrahends from the Size specified by Total.
When Optional is specified for SizeType, Size is used only when the condition of Validation is met.
When BitEnum is specified for SizeType, the matching Size is used compared to the bits of the field referenced by RefSize.
When BitReference is specified in SizeType, the bit of the field referenced by RefSize is used as Size.

Calculated : Example

  {
      "Name": "Data",
      "Size": {
          "SizeType": "Calculated",
          "Subtrahends": [
              {
                  "SizeType": "Constant",         < A
                  "Size": 1
              },
              {
                  "SizeType": "BitEnum",          < B
                   "Length": 3,
                  "Offset": 5,
                  "RefSize": "DataHeader",
                  "BitEnum": [
                      {
                          "BitArray": [
                              false,
                              false,
                              false
                          ],
                          "Size": 3
                      },
                      {
                          "BitArray": [
                              true,
                              false,
                              false
                          ],
                          "Size": 4
                      },
                      {
                          "BitArray": [
                              false,
                              true,
                              false
                          ],
                          "Size": 4
                      },
                      {
                          "BitArray": [
                              true,
                              true,
                              false
                          ],
                          "Size": 6
                      }
                  ]
              },
              {
                  "SizeType": "Optional",     < C
                  "Size": {
                      "SizeType": "Constant",
                      "Size": 4
                  },
                  "Validation": {
                      "ValidationType": "BitEquals",
                      "Length": 3,
                      "Offset": 5,
                      "Input": "DataHeader",
                      "Output": [
                          false,
                          true,
                          false
                      ]
                  }
              },
              {
                  "SizeType": "Optional",     < D
                  "Size": {
                      "SizeType": "Constant",
                      "Size": 1
                  },
                  "Validation": {
                      "ValidationType": "BitEquals",
                      "Length": 4,
                      "Offset": 0,
                      "Input": "DataHeader",
                      "Output": [
                          true,
                          true,
                          true,
                          true
                      ]
                  }
              },
              {
                  "SizeType": "Optional",     < E
                  "Size": {
                      "SizeType": "Constant",
                      "Size": 1
                  },
                  "Validation": {
                      "ValidationType": "BitEquals",
                      "Length": 1,
                      "Offset": 4,
                      "Input": "DataHeader",
                      "Output": [
                          true
                      ]
                  }
              },
              {
                  "SizeType": "Optional",     < F
                  "Size": {
                      "SizeType": "BitReference",
                      "Length": 4,
                      "Offset": 0,
                      "SizeRef": "ExtendedHeader"
                  },
                  "Validation": {
                      "ValidationType": "BitEquals",
                      "Length": 1,
                      "Offset": 4,
                      "Input": "DataHeader",
                      "Output": [
                          true
                      ]
                  }
              },
              {
                  "SizeType": "Constant",     < G
                  "Size": 1
              }
          ],
          "Total": {
              "SizeType": "Reference",
              "SizeRef": "DataLength"
          }
      }
  },

In this case, Data Size is calculated by subtracting the sum of A to G Size from the value of DataLength referenced by Total.

Optional、Validation : Example

    {
        "SizeType": "Optional",
        "Size": {
            "SizeType": "Constant",
            "Size": 4
        },
        "Validation": {
            "ValidationType": "BitEquals",
            "Length": 3,
            "Offset": 5,
            "Input": "DataHeader",
            "Output": [
                false,
                true,
                false
            ]
        }
    },

In this case, the number of Offset: 5 to Length: 3 bits in the field DataHeader that refers to bit comparison in BitEquals in Validation is compared with the value of Output in the number of bits in Offset, and Constant is a constant specification if they match. Uses 4

BitEnum : Example

    {
        "SizeType": "BitEnum", 
        "Length": 3,
        "Offset": 5,
        "RefSize": "DataHeader",
        "BitEnum": [
            {
                "BitArray": [
                    false,
                    false,
                    false
                ],
                "Size": 3
            },
            {
                "BitArray": [
                    true,
                    false,
                    false
                ],
                "Size": 4
            },
            {
                "BitArray": [
                    false,
                    true,
                    false
                ],
                "Size": 4
            },
            {
                "BitArray": [
                    true,
                    true,
                    false
                ],
                "Size": 6
            }
        ]
    },

In this case, the number of bits in Offset:5 to Length:3 of the field DataHeader referenced by RefSize is compared with the array of BitEnum, and if there is a matching BitArray, that Size is used.

BitReference : Example

    {
        "SizeType": "Optional", 
        "Size": {
            "SizeType": "BitReference",
            "Length": 4,
            "Offset": 0,
            "SizeRef": "ExtendedHeader"
        },
        "Validation": {
            "ValidationType": "BitEquals",
            "Length": 1,
            "Offset": 4,
            "Input": "DataHeader",
            "Output": [
                true
            ]
        }
    },

In this case, if the Validation matches, use the value of the number of bits in Offset:0 to Length:4 of the field ExtendedHeader referenced by SizeRef as Size.

※ For how to use Validation, please refer to Optional, Validation: Example.

—————————————————————

DataPackageSpec – Validations

  "DataPackageSpec": {
    “Validations": [],
  }

Validations are defined to validate that the data is in the correct structure and to validate which serial device the received data is from.
The sample compares the values ​​in the Head and Foot fields with the calculated values ​​in the CRC field to verify that the data is in the correct structure.

  {
    "ValidationType": "Equals",
    "Input": "Head",
    "Output": “FE"
  }
  {
    "ValidationType": "Equals",
    "Input": "Foot",
    "Output": “FF”
  }
  {
    "ValidationType": "CRC8",
    "Inputs": [
      "Head",
      “Type",
      "DataLength",
      "Data",
      “Foot"
    ],
    "Output": "CRC"
  }

The value of the DataLength field is compared to verify which serial device the received data is from.
If the value of DataLength is 1 byte, it is determined that the packet is data from the door sensor, and if 4 bytes, the data from the temperature sensor,
Validation is defined to determine that the data is 12 bytes from the accelerometer sensor.

Door:

  {
    "ValidationType": "Equals",
    "Input": "DataLength",
    "Output": “01”
  }

Temp:

  {
    "ValidationType": "Equals",
    "Input": "DataLength",
    "Output": “04”
  }

Accelerometer:

  {
    "ValidationType": "Equals",
    "Input": “DataLength",
    "Output": “0C”
  }

[Spec]

The type of validation is defined in ValidationType, Equals is the value match, BitEquals is the match of the bit value, and CRC8 is the match with the calculated CRC value.

In Equals, specify the field name to be compared in Input and the value to be compared in Output.

※ The field name is the name defined as Name in DataPackageSpec-Fields mentioned above.

Equals Example :

  {
    "ValidationType": "Equals",
    "Input": "Head",
    "Output": “FE"
  }

In this example, it is verified whether the value of the Head field is FE.

In BitEquals, the field name to be compared is Input, and the number of bits to be compared in that field is Length.
Specify Offset bit number of offset to start comparison and Output array value.

BitEquals Example :

  {
    "ValidationType": "BitEquals",
    "Length": 6,
    "Offset": 2,
    "Input": "Type",
    "Output": [
      true,
      false,
      false,
      true,
      true,
      true,
    ]
  }

In this example, it is verified whether the value of the “Type” field is “xx111001”.

In “CRC8”, specify the field names to be compared in the “Inputs” array, and specify the field names to be compared in “Output”.

“CRC8” Example :

  {
    "ValidationType": "CRC8",
    "Inputs": [
      "Head",
      “Type",
      "DataLength",
      "Data",
      “Foot"
    ],
    "Output": "CRC"
  }

In this example, the CRC calculation field is calculated by adding the values of the “Head”, “Type”, “Data Length”, “Data”, and “Foot” fields and calculating the CRC value.
It is verified whether it matches the value of the CRC field.

DataPackageSpec – Mappings

In Mappings, Fields of DataPackageSpec that defines data (message packet) from serial device, and
Associating with DataPoints (described later) to pass data to Gravio and converting data.

In the sample, both the door sensor and the temperature sensor transmit one type of data, and the acceleration sensor transmits three types of data.
The door sensor defines one four-byte integer, one four-byte floating point, and three four-byte floating point accelerometers.

Door:

  {
    "MappingType": "Byte",
    "Mapper": {
      "MapperType": "Straight"
    },
    "Name": “Contact status",
    "OutputType": 3,
    "Size": 0,
    "Start": 0,
    "TargetField": “Data"
  }

Temp:

   {
    "MappingType": "Byte",
    "Mapper": {
      "MapperType": "Straight"
    },
    "Name": “Ambient temperature”,
    "OutputType": 4,
    "Size": 0,
    "Start": 0,
    "TargetField": “Data"
  }

Accelerometer:

  {
    "MappingType": "Byte",
    "Mapper": {
      "MapperType": "Straight"
    },
    "Name": “Accelerometer X”,
    "OutputType": 4,
    "Size": 4,
    "Start": 0,
    "TargetField": “Data"
  }
  {
    "MappingType": "Byte",
    "Mapper": {
      "MapperType": "Straight"
    },
    "Name": “Accelerometer Y”,
    "OutputType": 4,
    "Size": 4,
    "Start": 4,
    "TargetField": “Data"
  }
  {
    "MappingType": "Byte",
    "Mapper": {
      "MapperType": "Straight"
    },
    "Name": “Accelerometer Z”,
    "OutputType": 4,
    "Size": 4,
    "Start": 8,
    "TargetField": “Data"
  }

[Spec]

In Mappings, specify Byte, Bit or String in MappingType as data type when extracting data from message packet.
When MappingType is Byte, OutputType can specify 0: Byte, 1: ByteArray, 3: Integer, 4: Float, or 5: Boolean.
When MappingType is Bit, OutputType can specify 3: Integer, 4: Float, or 5: Boolean.
When MappingType is String, OutputType can specify 2: String.
Mapper’s MapperType specifies Straight to output the data extracted from the message packet as it is, or Scale or Function to convert it.

※ When dealing with ByteArray and Integer, byte array is treated as big endian.
※ Float format is IEEE754 format.

When specifying Scale, specify ScaleBottom, ScaleTop, RangeBottom, and RangeTop, and specify OutputType as 3: Integer or 4: Float.

Scale Example :

  {
    "MappingType": "Byte",
    "Mapper": {
      "MapperType": "Scale",
      "RangeBottom": 255,
      "RangeTop": 0,
      "ScaleBottom": 0,
      "ScaleTop": 40
    },

Arithmetic expression :

    var totalRange = Math.Abs(RangeTop - RangeBottom);
    var totalScale = Math.Abs(ScaleTop - ScaleBottom);
    var range = BitConverter.ToInt32(data.ToArray(), 0);
    var factor = range / (double)totalRange;
    if (RangeBottom > RangeTop)
      factor = 1 - factor;

    When OutputType is Integer
      Calculated value is Integer type (factor * totalScale-(totalScale-ScaleTop))

    When OutputType is Float
      Calculated value is Float type (factor * totalScale-(totalScale-ScaleTop))

    ※ This formula is used to calculate the temperature value of EnOcean.

    Specify Function to convert the data extracted from the message packet by the function created by C # script.

Function Example :

   {
    "MappingType": "Bit",
    "Mapper": {
      "MapperType": "Function",
        "Function":"float result = (Data[1] << 8 ^ Data[0]) / (float)100;return BitConverter.GetBytes(result);"
      },
      "Name": "Temperature",
      "OutputType": 4,
      "Size": 16,
      "Start": 280,
      "TargetField": "Data"
    },

※ In this example, the data from the 280th byte to the first byte of Data is divided by 100 because it is a fixed fraction, and conversion processing is performed to floating point

Name specifies the name to use in DataPoints (described later).
OutputType is a number from 0 to 5, and specifies 0: Byte, 1: ByteArray, 2: String, 3: Integer, 4: Float, 5: Boolean.
The type of OutputType is the type of data passed to DataPoints (described later).
Size specifies the size of the data. If MappingType is Byte, it will be byte size, and if it is Bit, it will be the number of bits.
Start specifies the position from the beginning to acquire the data specified by TargetField.
TargetField specifies the conversion source field of data in Fields.

Data for Size (byte size if Mapping Type is Byte, bit number for Bit) starting with Start of the field specified in TargetField
The name specified in Name is passed to DataPoints (described later) using OutputType as a type.

Although not defined in the sample, you can also define IdMapping to specify the data sender ID.

In IdMapping, specify the field that becomes the ID of data from Fields of DataPackageSpec.
If not specified, Gravio’s DataViewer will display the COM port name with Zigbee dongle as the sender ID.
Specify Byte or Bit as MappingType when extracting data from the message packet.
Mapper’s MapperType specifies Straight.
Specify Name as “Id”, OutputType as 1 (ByteArray), Size as 0 and Start as 0.
In TargetField, specify a field that can identify the source of data in Fields.

IdMapping Example :

  "IdMapping": {
    "MappingType": "Byte",
    "Mapper": {
      "MapperType": "Straight"
    },
    "Name": "Id",
    "OutputType": 1,
    "Size": 0,
    "Start": 0,
    "TargetField": "SourceAddress"
  },

In the example, the field that the source can identify is specified as SourceAddress.

DataPoints node

Finally, in DataPoints, we define the data to be acquired by Gravio.
It is written at the top of the SDD file, but this document needs to be described last to understand the Fields that define the fields of the data, the Validations that validates, and the Mappings that maps Fields and DataPoints.

DataPoints specifies the data defined in Mappings. Also, by specifying a label by value, it can be defined as a character easy for people to understand, and Gravio can also acquire that character as data.

Door:

  "DataPoints": [
    {
      "Name": "Contact status",
      "Type": "int",
      "DataRule": {
        "RuleType": "set",
        "Values": [
          {
            "Label": "Contact closed",
            "Value": 1
          },
          {
            "Label": "Contact open",
            "Value": 0
          }
        ]
      }
    }
  ]

The door sensor data is one Integer type value (1 in closed state, 0 in open state), 1 is defined as Contact closed, and 0 is defined as Contact open.

Temp:

  "DataPoints": [
    {
      "Name": “Ambient temperature",
      "Type": “float",
    }
  ]

The temperature sensor data is defined as one float type value.

Accelerometer:

  "DataPoints": [
    {
      "Name": “Accelerometer X",
      "Type": “float",
    },
    {
      "Name": “Accelerometer Y",
      "Type": “float",
    },
    {
      "Name": “Accelerometer Z”,
      "Type": “float",
    }
  ]

The accelerometer sensor data is defined as three Float type values.

When acquiring multiple data from one sensor with Gravio, define multiple data points in DataPoints.
Gravio will collect several minutes of data as separate data.

In addition to accelerometers, for example, in the case of GPS data, DataPoints is as follows to define three data of latitude, longitude, and time.

GPS :

  "DataPoints": [
    {
      "Name": "Latitude",
      "Type": "float"
    },
    {
      "Name": "Longitude",
      "Type": "float"
    },
    {
      "Name": "Timestamp",
      "Type": "string"
    }
  ],

[Spec]

DataPoints define to pass data to Gravio.
Name defines the name specified in Mappings.
Type specifies int, float, double and string. Data is cast in each type.
To return the value as a string, define DataRule, RuleType, and specify the value as set.
In addition, for Value, specify the string returned as the return value to Label, and specify the value as Value.

set Example :

  "DataPoints": [
    {
      "Name": "Contact status",
      "Type": "int",
      "DataRule": {
        "RuleType": "set",
        "Values": [
          {
            "Label": "Contact closed",
            "Value": 1
          },
          {
            "Label": "Contact open",
            "Value": 0
          }
        ]
      }
    }
  ]

In this case, if the value is 1, contact closed is returned, and if it is 0, contact open is returned.

SDD file placement

The SDD file is copied to the following directory of Gravio Services, and it becomes effective by restarting Gravio Edge Service.

Windows case :

C:\ProgramData\Gravio\edge\formats
  • Since the C: \ ProgramData directory is a hidden directory under Windows standard, please change the display settings before copying SDD files.

reference url : https://support.microsoft.com/ja-jp/help/14201/windows-show-hidden-files

※ To restart Gravio Edge Service Please restart “Gravio Edge Service” from the service or restart Windows.

Mac case :

/Library/Application Support/Gravio/edge/formats
  • To restart Gravio Edge Service, uncheck or turn off the Gravio Edge Service check box in Settings’ Services, or restart your Mac.

Ubuntu & Raspberry PI case :

/etc/opt/gravio/edge/formats
  • To restart Gravio Edge Service, execute systemctl restart gravioedge from Terminal or restart Ubuntu / Raspberry PI.

Appendix: Resulting SDD files

SampleDoor.sdd

{
  "Name": "SampleDoor",
  "DataPoints": [
    {
      "Name": "Contact status",
      "Type": "int",
      "DataRule": {
        "RuleType": "set",
        "Values": [
          {
            "Label": "Contact closed",
            "Value": 1
          },
          {
            "Label": "Contact open",
            "Value": 0
          }
        ]
      }
    }
],
  "DataPackageSpec": {
    "Fields": [
      {
        "Name": "Head",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      },
      {
        "Name": "Type",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      },
      {
        "Name": "DataLength",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      },
      {
        "Name": "Data",
        "Size": {
          "SizeType": "Reference",
          "SizeRef": "DataLength"
        }
      },
      {
        "Name": "Foot",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      },
      {
        "Name": "CRC",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      }
    ],
    "Validations": [
      {
        "ValidationType": "Equals",
        "Input": "Head",
        "Output": "FE"
      },
      {
        "ValidationType": "Equals",
        "Input": "Foot",
        "Output": "FF"
      },
      {
        "ValidationType": "CRC8",
        "Inputs": [
          "Head",
          "Type",
          "DataLength",
          "Data",
          "Foot"
        ],
        "Output": "CRC"
      },
	{
        "ValidationType": "Equals",
        "Input": "DataLength",
        "Output": “01”
	}
    ],
    "Mappings": [
	 {
 	     "MappingType": "Byte",
  	     "Mapper": {
 	     "MapperType": "Straight"
 	 	},
 	 "Name": “Contact status",
 	 "OutputType": 3,
 	 "Size": 0,
 	 "Start": 0,
 	 "TargetField": “Data"
	}
]
  }
}

SampleTemperature.sdd

{
  "Name": “SampleTemperature",
  "DataPoints": [
    {
      "Name": “Ambient temperature",
      "Type": “float",
    }
  ],
  "DataPackageSpec": {
    "Fields": [
      {
        "Name": "Head",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      },
      {
        "Name": "Type",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      },
      {
        "Name": "DataLength",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      },
      {
        "Name": "Data",
        "Size": {
          "SizeType": "Reference",
          "SizeRef": "DataLength"
        }
      },
      {
        "Name": "Foot",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      },
      {
        "Name": "CRC",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      }
    ],
    "Validations": [
      {
        "ValidationType": "Equals",
        "Input": "Head",
        "Output": "FE"
      },
      {
        "ValidationType": "Equals",
        "Input": "Foot",
        "Output": "FF"
      },
      {
        "ValidationType": "CRC8",
        "Inputs": [
          "Head",
          "Type",
          "DataLength",
          "Data",
          "Foot"
        ],
        "Output": "CRC"
      },
	{
        "ValidationType": "Equals",
        "Input": "DataLength",
        "Output": “04”
	}
    ],
    "Mappings": [
	{
  	"MappingType": "Byte",
  	"Mapper": {
    	"MapperType": "Straight"
  	},
  	"Name": “Ambient temperature”,
  	"OutputType": 4,
  	"Size": 0,
  	"Start": 0,
  	"TargetField": “Data"
	}
	]
  }
}

SampleAccelerometer.sdd

{
  "Name": "SampleAccelerometer",
  "DataPoints": [
    {
      "Name": “Accelerometer X",
      "Type": “float",
    },
    {
      "Name": “Accelerometer Y",
      "Type": “float",
    },
    {
      "Name": “Accelerometer Z”,
      "Type": “float",
    }
  ],
  "DataPackageSpec": {
    "Fields": [
      {
        "Name": "Head",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      },
      {
        "Name": "Type",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      },
      {
        "Name": "DataLength",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      },
      {
        "Name": "Data",
        "Size": {
          "SizeType": "Reference",
          "SizeRef": "DataLength"
        }
      },
      {
        "Name": "Foot",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      },
      {
        "Name": "CRC",
        "Size": {
          "SizeType": "Constant",
          "Size": 1
        }
      }
    ],
    "Validations": [
      {
        "ValidationType": "Equals",
        "Input": "Head",
        "Output": "FE"
      },
      {
        "ValidationType": "Equals",
        "Input": "Foot",
        "Output": "FF"
      },
      {
        "ValidationType": "CRC8",
        "Inputs": [
          "Head",
          "Type",
          "DataLength",
          "Data",
          "Foot"
        ],
        "Output": "CRC"
      },
	{
        "ValidationType": "Equals",
        "Input": “DataLength",
        "Output": “0C”
	}
    ],
    "Mappings": [
{
  	"MappingType": "Byte",
  	"Mapper": {
    	"MapperType": "Straight"
  	},
  	"Name": “Accelerometer X”,
  	"OutputType": 4,
  	"Size": 4,
  	"Start": 0,
  	"TargetField": “Data"
},
{
  	"MappingType": "Byte",
  	"Mapper": {
    	"MapperType": "Straight"
  	},
  	"Name": “Accelerometer Y”,
  	"OutputType": 4,
  	"Size": 4,
  	"Start": 4,
  	"TargetField": “Data"
},
{
  "MappingType": "Byte",
  "Mapper": {
    	"MapperType": "Straight"
 	 },
  	"Name": “Accelerometer Z”,
  	"OutputType": 4,
  	"Size": 4,
  	"Start": 8,
 	 "TargetField": “Data"
	}
	]
  }
}

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment