Skip to content

Commit

Permalink
fix interfaces, add process response from server in manager breakpoin…
Browse files Browse the repository at this point in the history
…ts, memory, registers and statistics.

fix PIXI THUMDER cycle clock arrows and PIXI Table.
fix white-space pre in table.
remove columns in file-manager.
Layout in table memory, registers, and code.
add Types for server sockets.
  • Loading branch information
nonodev96 committed Dec 27, 2021
1 parent 06b99d4 commit 93f374c
Show file tree
Hide file tree
Showing 49 changed files with 1,594 additions and 1,245 deletions.
20 changes: 3 additions & 17 deletions UML/4.4.ModifyAccount.puml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@startuml
'https://plantuml.com/sequence-diagram

'TODO
autonumber

actor User
Expand All @@ -14,25 +14,11 @@ group#Gold User login

end

User -> InterfaceUI: Open file manager
User -> InterfaceUI: Open profile
activate InterfaceUI
User <- InterfaceUI: Show file manager
User <- InterfaceUI: Show profile
deactivate InterfaceUI

User -> InterfaceUI: Create file
InterfaceUI -> System: Create file
System -> Firebase: Create file

alt #LightGreen Ok
System <-- Firebase: Create file successful
InterfaceUI <- System: Create file successful
User <- InterfaceUI: Create file successful
else #Pink Error
System <-- Firebase: Create file error
InterfaceUI <- System: Create file error
User x<- InterfaceUI: Create file error
end

deactivate User

@enduml
65 changes: 65 additions & 0 deletions UML/5.1.Machine.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
@startuml
'https://plantuml.com/class-diagram
class MachineService {
+floatingPointStageConfiguration: TypeFloatingPointStageConfiguration
+pipeline: PixiTHUMDER_Pipeline
+cycleClockDiagram: PixiTHUMDER_CycleClockDiagram
+dataStatistics: ManagerStatistics
+registers: ManagerRegisters
+memory: ManagerMemory
+memorySize: any
+breakpointManager: ManagerBreakpoints
+code: Map<string, TypeCode>
-simulation: TypeSimulationInitResponse
-statusMachineInStep: TypeSimulationStep
+isBreakpoint$: Subject<number>
+codeSimulation$: Subject<TypeCode[]>
+stepSimulation$: Subject<TypeSimulationStep>
+dataStatistics$: Subject<TypeDataStatistics>
+logger: string
-privateStep: number
-privateLine: number
-timer: Observable<number>
-timerObserver: PartialObserver<number>
+reset$: Subject<void>
+logger$: Subject<string>
+step$: Subject<number>
+line$: Subject<number>
+isRunning$: Subject<boolean>
+isComplete$: Subject<boolean>
+isRunning: boolean
+isComplete: boolean
+isBreakpoint: boolean
-store: StorageService
-socketProviderConnect: SocketProviderConnectService
-translate: TranslateService
-toast: ToastrService
+resetMachineStatus(): Promise<boolean>
+getResetObservable(): Observable<void>
+getStepObservable(): Observable<number>
+getLineObservable(): Observable<number>
+getIsRunningObservable(): Observable<boolean>
+getStepSimulationObservable(): Observable<TypeSimulationStep>
+getCodeSimulationObservable(): Observable<TypeCode[]>
+getDebuggerObservable(): Observable<number>
+getDataStatisticsObservable(): Observable<TypeDataStatistics>
+getLoggerObservable(): Observable<string>
+getStatusWebsocketObservable(): Observable<"Connect" | "Disconnect">
+getStatusWebsocket(): "Connect" | "Disconnect"
+getListStatusPipeline(stepSimulation: TypeSimulationStep): TypeStatusPipeline[]
+play(): Promise<void>
+reset(): Promise<void>
+nextStep(): Promise<void>
+pause(): Promise<void>
+resume(): Promise<void>
+end(): Promise<void>
-SimulationInit(): Promise<boolean>
-SimulationNextStep(): Promise<void>
-CheckConditions(): Promise<boolean>
-Clock(): Promise<void>
+log(msg: any): void
+getCode(address: string): TypeCode
+getAllStatusMachine(): TypeStatusMachine
-toastMessage(key_title?: string, key_message?: string): Promise<void>
}
@enduml
72 changes: 72 additions & 0 deletions UML/5.2.ManagerMemory.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
@startuml
'https://plantuml.com/class-diagram
left to right direction

class ManagerMemory implements InterfaceMemory {
-_memorySizeBytes: number
-_memoryInt8Array: Uint8Array
+memorySizeBytes: number
+memorySizeBytes: number
+processResponse(response: TypeMemoryToUpdate[]): void
+getMemoryWordByIndex(index: number): Int32
+getMemoryWordByAddress(address: string): Int32
+getMemoryWordBinaryByIndex(index: number): string
+setMemoryWordByIndex(index: number, data: Int32): void
+setMemoryWordByAddress(address: string, data: Int32): void
+setMemoryWordBinaryByAddress(address: string, binary32: string): void
+setMemoryWordBinaryByIndex(index: number, binary32: string): void
+getMemoryByteBinaryByIndex(index: number): string
+setMemoryByteBinaryByIndex(index: number, binary: string): void
+setMemoryByteBinaryByAddress(address: string, binary08: string): void
+getMemoryHalfWordBinaryByIndex(index: number): string
+setMemoryHalfWordBinaryByIndex(index: number, binary16: string): void
+setMemoryHalfWordBinaryByAddress(address: string, binary16: string): void
+setMemoryFloatBinaryByAddress(address: string, binary32: string): void
+setMemoryDoubleBinaryByAddress(address: string, binary64: string): void
-setMemory_stringBinary_ByIndex(index: number, binary_08_16_32_64: string): void
+getAllMemoryWord(): Int32[]
+getAllIndexByWord(): number[]
+reset(): void
+setSize(memorySize: number): void
+getAllMemory(): TypeMemory[]
}
class ManagerRegisters implements InterfaceRegisters {
+PC: Int32
+IMAR: Int32
+IR: Int32
+A: Int32
+AHI: Int32
+B: Int32
+BHI: Int32
+BTA: Int32
+ALU: Int32
+ALUHI: Int32
+FPSR: Int32
+DMAR: Int32
+SDR: Int32
+SDRHI: Int32
+LDR: Int32
+LDRHI: Int32
+R: Int32[]
+F: Float32[]
+processResponse(response: TypeRegisterToUpdate[]): void
+reset(): void
}
class ManagerBreakpoints implements InterfaceBreakpoints {
-breakpoints: TypeBreakpoints
+toggleBreakpoint(lineNumber: number): void
+getBreakpoint(lineNumber: number): boolean
+updateManager(breakpoints: TypeBreakpoints): void
+getAllBreakpoints(): TypeBreakpoints
+getAllLinesWithBreakpoints(): number[]
+isBreakpoint(line: number): boolean
+reset(): void
}
class ManagerStatistics implements InterfaceDataStatistics {
-_data: TypeDataStatistics
+processResponse(response: Partial<TypeDataStatistics>): void
+getData(): TypeDataStatistics
+reset(): void
}

@enduml
30 changes: 24 additions & 6 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,16 @@
},
"configurations": {
"dev": {
"optimization": false,
"optimization": {
"scripts": false,
"styles": {
"minify": false,
"inlineCritical": false
},
"fonts": {
"inline": false
}
},
"outputHashing": "all",
"sourceMap": true,
"namedChunks": false,
Expand All @@ -129,7 +138,16 @@
]
},
"web": {
"optimization": false,
"optimization": {
"scripts": false,
"styles": {
"minify": false,
"inlineCritical": false
},
"fonts": {
"inline": false
}
},
"outputHashing": "all",
"sourceMap": true,
"namedChunks": false,
Expand All @@ -154,12 +172,12 @@
"production": {
"optimization": {
"scripts": false,
"fonts": {
"inline": true
},
"styles": {
"minify": true,
"minify": false,
"inlineCritical": false
},
"fonts": {
"inline": false
}
},
"outputHashing": "all",
Expand Down
8 changes: 8 additions & 0 deletions angular.webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,13 @@ module.exports = (config, options) => {
break;
}
}
// config.externals = {
// "electron": "require('electron')",
// "child_process": "require('child_process')",
// "fs": "require('fs')",
// "url": "require('url')",
// "pixi.js-keyboard": require('pixi.js-keyboard'),
// "pixi.js-mouse": require('pixi.js-mouse')
// }
return config;
}
2 changes: 1 addition & 1 deletion e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../tsconfig.base.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
Expand Down
9 changes: 4 additions & 5 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { app, BrowserWindow, screen } from 'electron';
import * as path from 'path';
import * as url from 'url';
import { app, BrowserWindow, screen } from "electron";
import * as path from "path";
import * as url from "url";

let win: BrowserWindow = null;
const args = process.argv.slice(1);
const isServe = args.some(val => val === '--serve');

function createWindow(): BrowserWindow {

const electronScreen = screen;
const size = electronScreen.getPrimaryDisplay().workAreaSize;
const size = screen.getPrimaryDisplay().workAreaSize;

// Create the browser window.
win = new BrowserWindow({
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "thumder",
"version": "1.2.8",
"version": "1.2.9",
"description": "TFG - THUMDER (THe UltiMate Dlx EmulatoR): emulador multiplataforma DLX con fines didácticos",
"homepage": "https://github.com/nonodev96/THUMDER",
"author": {
Expand All @@ -27,7 +27,7 @@
"main": "main.js",
"private": true,
"scripts": {
"ws:server": "node ../THUMDER-ontology/example/server/dist/main.js",
"ws:server": "node ../THUMDER-server/dist/main.js",
"postinstall": "electron-builder install-app-deps",
"ng": "ng",
"start": "npm-run-all -p electron:serve ng:serve",
Expand Down
Loading

0 comments on commit 93f374c

Please sign in to comment.