entsoe-state-maschine

0.5.225 • Public • Published

ENTSO-e State Maschine

  • This service calculates entsoe data.
  • It gives information about the calculation state.
  • It is interuptable after every pipeline step.
  • Prevent recalculation by caching.
  • Prevents frocen screen
  • Debug executors

Install

npm i entsoe-state-maschine

stateMaschine = new PowerPipe();
stateMaschine.state$.next(state);

stateMaschine.modifiedChart?.subscribe(chartGroup => {
  console.log(chartGroup)
})

Pipeline State

This is an image

stateMaschine = new PowerPipe();

stateMaschine.pipelineState?.subscribe(pipeState => {
  console.log(pipeState)
}
stateMaschine.state$.next(state);


Debug

stateMaschine = new PowerPipe();

showCachedData(step:number) {
  stateMaschine.setCacheStep(number) 
}


Create Pipelines

export class PowerPipe extends StateMaschine {

  entsoeService = new EntsoeService();
  entsoeLoader = new EntsoeLoader(this.entsoeService);
  multiply = new MultiplyTransformer();
  units = new UnitsTransformer(this.entsoeService)

  constructor() {
    super()
  }

  pipeline: Transformer[] = [
    this.entsoeLoader,
    this.units,
    this.multiply,
  ];
}

Create Transformers

export class MyTransformer implements Transformer {
  register(){
    return {
      filter: '$.display',
      name: 'units',
      shortName: 'ut'
    }
  }
  async modify(chart, state) {
    return chart;
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i entsoe-state-maschine

Weekly Downloads

0

Version

0.5.225

License

ISC

Unpacked Size

381 kB

Total Files

230

Last publish

Collaborators

  • powercalculator