# Obtaining SCADA data
To obtain SCADA data, call the API from the ./src/lib/scadaOpcApi.ts file.
- To get the group1 (station names) list, call scadaOpcApi.getGroup1List().
- To get realtime filtered data by group1, group2 and alarmed status, call scadaOpcApi.getRealtimeFilteredData().
- To get realtime data and catalog data for tag names list, call scadaOpcApi.getRealTimeData().
- To get historical data for a tag, call scadaOpcApi.getHistoricalData().
- To get Sequence of Events (SOE) data, call scadaOpcApi.getSoeData().
- To issue a command for a tag, call scadaOpcApi.issueCommand().
- To write the given extended properties of a tag, call scadaOpcApi.writeTagProperties().
# General Rules
- Think step-by-step.
- Provide a clear and concise description of the problem solving strategy.
- Prioritize modularity, DRY principles, and performance.
- Do not make assumptions or speculate without clear evidence.
- Don't invent changes other than what's explicitly requested.
- Adhere to the existing coding style in the project for consistency.
- Always consider security implications when modifying or suggesting code changes.
- Implement robust error handling and logging where necessary.
- Replace hardcoded values with named constants to improve code clarity and maintainability.
- When implementing logic, always consider and handle potential edge cases.
# Framework Rules
- Use the Astro framework.
- Use Astro 5.0 or later, Vite, TypeScript, and TailwindCSS.
- Ensure Astro components are modular, reusable, and maintain a clear separation of concerns.
astro
batchfile
c
c#
c++
cmake
css
go
+20 more
First Time Repository
31484
A portable and scalable SCADA/IIoT-I4.0/Gateway platform centered on the MongoDB database server.
C
Languages:
Astro: 9.5KB
Batchfile: 58.4KB
C: 6004.9KB
C#: 4809.3KB
C++: 29.8KB
CMake: 62.0KB
CSS: 188.1KB
Go: 139.2KB
HTML: 530.8KB
Java: 247.4KB
JavaScript: 4517.5KB
Makefile: 40.9KB
NSIS: 29.6KB
Nix: 5.0KB
PHP: 11.7KB
PowerShell: 0.3KB
Python: 14.7KB
Ruby: 0.6KB
SCSS: 20.5KB
SWIG: 5.3KB
Shell: 46.1KB
TypeScript: 250.9KB
Visual Basic .NET: 0.6KB
Vue: 248.0KB
Created: 7/30/2020
Updated: 1/17/2025
All Repositories (1)
31484
A portable and scalable SCADA/IIoT-I4.0/Gateway platform centered on the MongoDB database server.