Skip to main content

L2 CDK construct to provision AWS IoT Fleetwise

Project description

NPM version PyPI version release

cdk-aws-iotfleetwise

L2 CDK construct to provision AWS IoT Fleetwise

Install

Typescript

npm install cdk-aws-iotfleetwise

API Reference

Python

pip install cdk-aws-iotfleetwise

API Reference

Sample

import { SignalCatalog,
         VehicleModel,
         Vehicle,
         Campaign,
         CanVehicleInterface,
         CanVehicleSignal,
         SignalCatalogBranch,
         TimeBasedCollectionScheme
         } from 'cdk-aws-iotfleetwise';

const signalCatalog = new SignalCatalog(stack, 'SignalCatalog', {
  database,
  table,
  role,
  nodes: [
    new SignalCatalogBranch('Vehicle'),
    new SignalCatalogSensor('Vehicle.EngineTorque', 'DOUBLE'),
  ],
});

const model_a = new VehicleModel(stack, 'ModelA', {
  signalCatalog,
  name: 'modelA',
  description: 'Model A vehicle',
  networkInterfaces: [new CanVehicleInterface('1', 'vcan0')],
  signals: [
    new CanVehicleSignal('Vehicle.EngineTorque', '1',
      401, // messageId
      1.0, // factor
      true, // isBigEndian
      false, // isSigned
      8, // lenght
      0.0, // offset
      9), // startBit
  ],
});

const vin100 = new Vehicle(stack, 'vin100', {
  vehicleName: 'vin100',
  vehicleModel: model_a,
  createIotThing: true
});

new Campaign(stack, 'Campaign', {
  name: 'TimeBasedCampaign',
  target: vin100,
  collectionScheme: new TimeBasedCollectionScheme(cdk.Duration.seconds(10)),
  signals: [
    new CampaignSignal('Vehicle.EngineTorque'),
  ],
});

Getting started

To deploy a simple end-to-end example you can use the following commands

yarn install
projen && projen compile
npx cdk -a lib/integ.full.js deploy -c key_name=mykey

Where mykey is an existing keypair name present in your account. The deploy takes about 15 mins mostly due to compilation of the IoT FleetWise agent in the EC2 instance that simulate the vehicle. Once deploy is finshed, data will start to show up in your Timestream table.

TODO

Warning: this construct should be considered at alpha stage and is not feature complete.

  • Implement updates for all the custom resources
  • Conditional campaigns

Security

See CONTRIBUTING for more information.

License

This code is licensed under the MIT-0 License. See the LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cdk-aws-iotfleetwise-0.2.16.tar.gz (10.6 MB view details)

Uploaded Source

Built Distribution

cdk_aws_iotfleetwise-0.2.16-py3-none-any.whl (10.6 MB view details)

Uploaded Python 3

File details

Details for the file cdk-aws-iotfleetwise-0.2.16.tar.gz.

File metadata

  • Download URL: cdk-aws-iotfleetwise-0.2.16.tar.gz
  • Upload date:
  • Size: 10.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for cdk-aws-iotfleetwise-0.2.16.tar.gz
Algorithm Hash digest
SHA256 91a7eda664a25bf58c84cc7be2e34c868040aef8ca5417dc8b8450d13976d862
MD5 47b334933cc2d1a48cf35f030727fc9b
BLAKE2b-256 ad0a4a2fe8de9a5462f9d6de8cef1d28fdb7c8d4ffc9112e9420514d1269f721

See more details on using hashes here.

File details

Details for the file cdk_aws_iotfleetwise-0.2.16-py3-none-any.whl.

File metadata

File hashes

Hashes for cdk_aws_iotfleetwise-0.2.16-py3-none-any.whl
Algorithm Hash digest
SHA256 bcabc4c5e39f786a046bb144d0d0b8bd951b6293fb5ab57d730d320d75cd0937
MD5 39c8192ac90649689f8488bea8576c8f
BLAKE2b-256 74f1b7c30ef5bae2ab042bd4005b5fbaf7cd28413eb0cbbf3eca47becfc8c541

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page