async function createType_StatusData() {
    const capId = await createCapabilityUnlessExists('StatusData', [
        // Mapping StatusData.data
        { name: 'value',          dataType: DataType.FLOAT },
        // The next 4 elements map the Diagnostic properties with the same name
        { name: 'name',           dataType: DataType.STRING },
        { name: 'code',           dataType: DataType.INTEGER },
        { name: 'diagnosticType', dataType: DataType.STRING },
        { name: 'faultResetMode', dataType: DataType.STRING },
        // Mapping StatusData.dateTime, the time stamp of the measurement
        { name: 'dateTime',       dataType: DataType.DATE }
    ]);
    return createSensorTypeUnlessExists('StatusData', capId);
}
/**
 * Map the Geotab typeName 'StatusData' and the 'Diagnostic' it references to SAP IoT Service data model.
 *
 * The data type is specified according to the SAP IoT Service rules as a Capability and a Sensor Type
 * providing the corresponding measurement data.
 *
 * NOTE: The mapping is too simplistic. The Geotab typeName 'StatusData' actually contains data from
 * different sensors distinguished by diagnostic.id. For a more proper mapping different sensors and
 * sensor types should be created in SAP IoT Service, and data from different Geotab sensors should be
 * modeled as coming from different SAP sensors. This is semantically correct, preserves the unit of
 * measure, etc. We avoid such complications in this code sample.
 */
Map the Geotab typeName 'StatusData' and the 'Diagnostic' it references to SAP IoT Service data model.
The data type is specified according to the SAP IoT Service rules as a Capability and a Sensor Type
providing the corresponding measurement data.

The mapping is too simplistic. The Geotab typeName 'StatusData' actually contains data from
different sensors distinguished by diagnostic.id. For a more proper mapping different sensors and
sensor types should be created in SAP IoT Service, and data from different Geotab sensors should be
modeled as coming from different SAP sensors. This is semantically correct, preserves the unit of
measure, etc. We avoid such complications in this code sample.
Map the Geotab typeName ' StatusData ' and the ' Diagnostic ' it references to SAP IoT Service data model . The data type is specified according to the SAP IoT Service rules as a Capability and a Sensor Type providing the corresponding measurement data . The mapping is too simplistic . The Geotab typeName ' StatusData ' actually contains data from different sensors distinguished by diagnostic . id . For a more proper mapping different sensors and sensor types should be created in SAP IoT Service and data from different Geotab sensors should be modeled as coming from different SAP sensors . This is semantically correct preserves the unit of measure etc . We avoid such complications in this code sample .
async function createType_StatusData() {
    const capId = await createCapabilityUnlessExists('StatusData', [
        { name: 'value',          dataType: DataType.FLOAT },
        { name: 'name',           dataType: DataType.STRING },
        { name: 'code',           dataType: DataType.INTEGER },
        { name: 'diagnosticType', dataType: DataType.STRING },
        { name: 'faultResetMode', dataType: DataType.STRING },
        { name: 'dateTime',       dataType: DataType.DATE }
    ]);
    return createSensorTypeUnlessExists('StatusData', capId);
}
async function createType_StatusData ( ) { const capId = await createCapabilityUnlessExists ( 'StatusData' , [ { name : 'value' , dataType : DataType . FLOAT } , { name : 'name' , dataType : DataType . STRING } , { name : 'code' , dataType : DataType . INTEGER } , { name : 'diagnosticType' , dataType : DataType . STRING } , { name : 'faultResetMode' , dataType : DataType . STRING } , { name : 'dateTime' , dataType : DataType . DATE } ] ) ; return createSensorTypeUnlessExists ( 'StatusData' , capId ) ; }
Map the Geotab typeName 'StatusData' and the 'Diagnostic' it references to SAP IoT Service data model.
Map the Geotab typeName ' StatusData ' and the ' Diagnostic ' it references to SAP IoT Service data model .
// Mapping StatusData.data // The next 4 elements map the Diagnostic properties with the same name // Mapping StatusData.dateTime, the time stamp of the measurement