Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IoT Sitewise L2 Construct #423

Closed
1 of 11 tasks
yamatatsu opened this issue Apr 18, 2022 · 4 comments
Closed
1 of 11 tasks

IoT Sitewise L2 Construct #423

yamatatsu opened this issue Apr 18, 2022 · 4 comments
Labels

Comments

@yamatatsu
Copy link

Description

I would like to implement IoT Sitewise L2 Construct. It has already got some votes (see, aws/aws-cdk#11451). Also, the resource relationships in Sitewise are complex, so there is worth expressing in CDK I think.

Roles

Role User
Proposed by @yamatatsu
Author(s) @alias, @alias, @alias
API Bar Raiser @alias
Stakeholders @alias, @alias, @alias

See RFC Process for details

Workflow

  • Tracking issue created (label: status/proposed)
  • API bar raiser assigned (ping us at #aws-cdk-rfcs if needed)
  • Kick off meeting
  • RFC pull request submitted (label: status/review)
  • Community reach out (via Slack and/or Twitter)
  • API signed-off (label api-approved applied to pull request)
  • Final comments period (label: status/final-comments-period)
  • Approved and merged (label: status/approved)
  • Execution plan submitted (label: status/planning)
  • Plan approved and merged (label: status/implementing)
  • Implementation complete (label: status/done)

Author is responsible to progress the RFC according to this checklist, and
apply the relevant labels to this issue so that the RFC table in README gets
updated.

@yamatatsu yamatatsu changed the title IoT Sitewise L2 Construct IoT AppConfig L2 Construct Apr 22, 2022
@yamatatsu yamatatsu changed the title IoT AppConfig L2 Construct IoT Sitewise L2 Construct Apr 22, 2022
@donatoaz
Copy link

What is the status of this RFC? I would like to resume work on this. Should I create a new RFC ticket, or can someone re-open this issue?

@donatoaz
Copy link

donatoaz commented Feb 8, 2023

Thanks for reopening @rix0rrr . I have posted a message on slack searching for a bar raiser (assuming one is needed).

Here are some of my API ideas for Asset Models:

Create an Asset Model

const generatorModel = new sw.AssetModel(this, 'GeneratorModel', {
  name: 'Generator model 262966 Doppler',
});

Add properties to an asset model

const serialNum = new sw.Attribute({
  name: 'serial',
  defaultValue: 'noserial',
  dataType: sw.DataType.STRING,
});
generatorModel.addAttribute(serialNum);

const watts_1m = new sw.Measurement({
  name: 'watts_1m',
  unit: 'Watts/min',
  dataType: sw.DataType.DOUBLE,
});
generatorModel.addMeasurement(watts_1m);

const watts_5m = new sw.Metric({
  name: 'sum_watts_5m',
  expression: 'sum(watts_1m)',
  dataType: sw.DataType.DOUBLE,
  tumblingWindow: { interval: '5m' },
  variables: [{ name: 'watts_1m', property: watts_1m }],
});
generatorModel.addMetric(watts_5m);

Create an asset hierarchy

The addChild method returns the child, so you can chain calls and construct
nested hierarchies.

The addChildren method returns the parent, so you can chain calls to construct
wide hierarchies.

const nuclearPlant = new AssetModel(this, 'NuclearPlant', { name: 'Nuclear Power Plant' });

const steamPlant = new AssetModel(this, 'SteamPlant', { name: 'Steam Plant' });
const boiler = new AssetModel(this, 'Boiler', { name: 'Boiler model A' });
const reactor = new AssetModel(this, 'Reactor', { name: 'Uranium reactor' });
const controlRods = new AssetModel(this, 'Control', { name: 'Control Rods' });

const generationPlant = new AssetModel(this, 'GenerationPlant', { name: 'Generation' });
const turbine = new AssetModel(this, 'Turbine', { name: 'Steam Turbine model B' });
const generator = new AssetModel(this, 'Generator', { name: 'Generator model C' });
const cooler = new AssetModel(this, 'Cooler', { name: 'Generator cooler' });
const coolantPump = new AssetModel(this, 'Pump', { name: 'Coolant Pump' });
const transformer = new AssetModel(this, 'Transformer');

reactor.addChild(controlRods);

generator
  .addChild(cooler)
    .addChild(coolantPump);

nuclearPlant
  .addChildren(
    steamPlant
      .addChildren(boiler, reactor)
  )
  .addChildren(
    generationPlant
      .addChildren(turbine, generator, transformer)
  )

@donatoaz
Copy link

donatoaz commented Feb 8, 2023

Ultimately, one of my visions would be to create a curated repository of asset models for industrial equipment, ideally maintained by manufacturers themselves. Much like we have the constructs library with reusable patterns we could have a one-stop-shop for asset models.

@evgenyka evgenyka added l2-request request for new L2 construct bar-raiser/needed labels Aug 10, 2023
@awsmjs
Copy link
Contributor

awsmjs commented Dec 14, 2023

Closing this ticket. We believe the functionality is beneficial, but does not intersect with the core framework and should be vended and maintained separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants