Skip to content

hsu-aut/fpb-aml-mapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fpb-aml-mapper

Bidirectional mapping between FPB.js JSON and AutomationML (CAEX 3.0) based on VDI 3682.

The conversion uses the official Aml.Engine SDK for CAEX-conformant output: proper library generation (RCL, SUCL, ICL, ATL), class instantiation via CreateClassInstance(), and automatic RoleRequirements on all InternalElement nodes.

Live

aml.fpbjs.net — Web UI for drag & drop conversion.

Architecture

Browser (aml.fpbjs.net)
  └── Node.js proxy (server.js, Plesk)
        └── POST /api/to-aml | /api/to-json
              └── .NET 8 API (Azure App Service)
                    └── Aml.Engine SDK

.NET Backend

The dotnet/ folder contains the ASP.NET Core web API with the Aml.Engine-based conversion.

Build & Run locally

cd dotnet
dotnet run --project FpbMapper.Web

Deploy to Azure

cd dotnet
dotnet publish FpbMapper.Web -c Release -o publish
cd publish && zip -r ../deploy.zip . && cd ..
az webapp deploy --resource-group <rg> --name <app> --src-path deploy.zip --type zip

API Endpoints

Endpoint Input Output
POST /api/to-aml FPB.js JSON (text/plain) AutomationML (application/xml)
POST /api/to-json AutomationML (text/plain) FPB.js JSON (application/json)

Node.js Proxy

server.js is a lightweight Express proxy that serves the web UI and forwards /api/* requests to the .NET backend. Requires the DOTNET_API environment variable.

DOTNET_API=https://your-backend-url npm start

Structure

server.js                    # Node.js proxy (Plesk)
dotnet/
├── FpbMapper.sln
├── FpbMapper.Conversion/    # Conversion logic (Aml.Engine)
│   ├── FpbJsonToCaex.cs     # JSON -> CAEX 3.0
│   ├── CaexToFpbJson.cs     # CAEX 3.0 -> JSON
│   ├── FpdLibraries.cs      # FPD library definitions
│   └── FpbMappings.cs       # Type mappings
└── FpbMapper.Web/           # ASP.NET Core API

License

MIT

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors