Skip to content

Commit

Permalink
Refactor in all firebase method with new modular functions and provid…
Browse files Browse the repository at this point in the history
…ers for electron.

angular 12 with firebase 9
@angular/fire 7
electron 12 with electron-builder 23
  • Loading branch information
nonodev96 committed Mar 31, 2022
1 parent 86b65fa commit f8de3f8
Show file tree
Hide file tree
Showing 26 changed files with 809 additions and 547 deletions.
51 changes: 51 additions & 0 deletions UML/Core/Interface.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
@startdef(id=InterfaceRegisters)
interface 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[]
+processRegisterToUpdateArray(response: TypeRegisterToUpdate[]): void
+reset(): void
}
@enddef

@startdef(id=InterfaceBreakpoints)
interface InterfaceBreakpoints {
+_breakpoints: TypeBreakpoints
+getBreakpoints(): TypeBreakpoints[]
+reset(): void
}
@enddef

@startdef(id=InterfaceMemory)
interface InterfaceMemory {
+_memorySizeBytes: number
+_memoryInt8Array: Uint8Array
+processResponseMachineDirectives(directives: TypeDirectiveData[]): void
+processResponseMachineInstructions(instructions: TypeInstructionsData[]): void
+processMemoryToUpdateArray(response: TypeMemoryToUpdate[]): void
+reset(newMemorySizeBytes: number): void
}
@enddef

@startdef(id=InterfaceDataStatistics)
interface InterfaceDataStatistics {
+_data: TypeDataStatistics
+processResponse(response: Partial<TypeDataStatistics>): void
+reset()
}
@enddef
71 changes: 71 additions & 0 deletions UML/Core/Machine.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
@startdef(id=MachineService)
class MachineService {
+floatingPointStageConfiguration: TypeFloatingPointStageConfiguration
+pipeline: PixiTHUMDER_Pipeline
+cycleClockDiagram: PixiTHUMDER_CycleClockDiagram
+dataStatistics: ManagerStatistics
+registers: ManagerRegisters
+memory: ManagerMemory
+memorySize: any
+breakpointManager: ManagerBreakpoints
+code: UtilsDataStructures.THUMDER_Map<TypeAddress, TypeInstructionsData>
+canSimulate: boolean
-statusMachineInStep: TypeSimulationStep
+isBreakpoint$: Subject<number>
+codeSimulation$: Subject<TypeInstructionsData[]>
+stepSimulation$: Subject<TypeSimulationStep>
+dataStatistics$: Subject<TypeDataStatistics>
+logger: string
-level: EnumLogLevel
-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>
+getIsCompleteObservable(): Observable<boolean>
+getStepSimulationObservable(): Observable<TypeSimulationStep>
+getCodeSimulationObservable(): Observable<TypeInstructionsData[]>
+getDebuggerObservable(): Observable<number>
+getDataStatisticsObservable(): Observable<TypeDataStatistics>
+getLoggerObservable(): Observable<string>
+getStatusWebsocketObservable(): Observable<"Connect" | "Disconnect">
+getStatusWebsocket(): "Connect" | "Disconnect"
+getListStatusPipeline(): TypePipelineToProcess[]
+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>
-ProcessStep(): Promise<void>
+updateRegisterInServer(registersToUpdate: TypeRegisterToUpdate[]): Promise<boolean>
+updateMemoryInServer(memoryToUpdate: TypeMemoryToUpdate[]): Promise<boolean>
+writeToLog(msg: string, level?: EnumLogLevel, params?: TypeLogger[]): void
+getCode(address: TypeAddress): TypeInstructionsData
+getAllStatusMachine(): TypeStatusMachine
+resetConnection(): void
-stringFormat(msg: string, params: TypeLogger[]): string
-shouldLog(level: EnumLogLevel): boolean
-toastMessage(key_title?: string, key_message?: string): Promise<void>
}
@enddef
90 changes: 90 additions & 0 deletions UML/Core/Manager.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
@startdef(id=ManagerMemory)
' implements InterfaceMemory
class ManagerMemory {
+_memorySizeBytes: number
+_memoryInt8Array: Uint8Array
+processResponseMachineDirectives(directives: TypeDirectiveData[]): void
+processResponseMachineInstructions(instructions: TypeInstructionsData[]): void
+processMemoryToUpdateArray(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[]
+setSize(memorySize: number): void
+getAllMemory(): TypeMemory[]
+reset(newMemorySizeBytes: number): void
}
@enddef

@startdef(id=ManagerBreakpoints)
' implements InterfaceBreakpoints
class ManagerBreakpoints {
+_breakpoints: TypeBreakpoints
+toggleBreakpoint(lineNumber: number): void
+getBreakpoint(lineNumber: number): boolean
+updateManager(breakpoints: TypeBreakpoints): void
+getAllBreakpoints(): TypeBreakpoints
+getAllLinesWithBreakpoints(): number[]
+isBreakpoint(line: number): boolean
+reset(): void
}
@enddef

@startdef(id=ManagerStatistics)
' implements InterfaceDataStatistics
class ManagerStatistics {
+_data: TypeDataStatistics
+processResponse(response: Partial<TypeDataStatistics>): void
+getData(): TypeDataStatistics
+reset(): void
}
@enddef

@startdef(id=ManagerRegisters)
' implements InterfaceRegisters
class ManagerRegisters {
+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[]
+processRegisterToUpdateArray(response: TypeRegisterToUpdate[]): void
+setRegisterControlWithHexadecimal(registerControl: TypeRegisterControl, hexadecimal: string): void
+setRegisterIntegerWithHexadecimal(index: number, hexadecimal: string): void
+setRegisterFloatWithHexadecimal(index: number, hexadecimal: string): void
+setRegisterDoubleWithHexadecimal(index: number, hexadecimal: string): void
+setRegisterControlWithBinary(registerControl: TypeRegisterControl, binary: string): void
+setRegisterIntegerWithBinary(index: number, binary: string): void
+setRegisterFloatWithBinary(index: number, binary: string): void
+setRegisterDoubleWithBinary(index: number, binary: string): void
+reset(): void
}
@enddef

102 changes: 102 additions & 0 deletions UML/Core/PixiTHUMDER.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
@startdef(id=PixiTHUMDER_Pipeline)
class PixiTHUMDER_Pipeline {
-InstStages_text: PIXI.Text
-IF_text: PIXI.Text
-ID_text: PIXI.Text
-intEX_text: PIXI.Text
-MEM_text: PIXI.Text
-WB_text: PIXI.Text
-faddEX_array: PIXI.Text[]
-fmultEX_array: PIXI.Text[]
-fdivEX_array: PIXI.Text[]
-faddEX_count: any
-fmultEX_count: any
-fdivEX_count: any
+reset(faddEX_count: number, fmultEX_count: number, fdivEX_count: number): void
-initTexts(): void
-drawText(object: PIXI.Text, coords: CoordsType): void
-initArrows(): void
-initBoxes(): void
-drawBox(color: number, positionStart: CoordsType, text: string): void
-drawLine(from: CoordsType, to: CoordsType): void
-drawArrow(from: CoordsType, to: CoordsType): void
+update_IF_text(value: string): void
+update_ID_text(value: string): void
+update_intEX_text(value: string): void
+update_faddEX_text(count: number, value: string): void
+update_fmultEX_text(count: number, value: string): void
+update_fdivEX_text(count: number, value: string): void
+update_MEM_text(value: string): void
+update_WB_text(value: string): void
+draw(): PIXI.Container
+toString(): string
}
@enddef

@startdef(id=Position)
class Position {
+row: any
+col: any
+toString(): string
}
@enddef

@startdef(id=PixiTHUMDER_Table)
class PixiTHUMDER_Table {
+table: Map<string, PIXI.Container>
-cellMaxWidth: any
-cellMaxHeight: any
-rowSeparation: any
-columnSeparation: any
-isDebug: false
+getAllPositions(): Position[]
+getAllRows(): number[]
+getAllColumns(): number[]
+deleteRow(row: number): void
+deleteCol(col: number): void
+deleteCell(row: number, col: number): boolean
+clearCell(row: number, col: number): void
+setCell(row: number, col: number, content: PIXI.Container): void
+drawCell(row: number, col: number): void
+draw(): PIXI.Container
+existCell(row: number, col: number): boolean
-getCell(row: number, col: number): PIXI.Container
}
@enddef


@startdef(id=PixiTHUMDER_CycleClockDiagram)
class PixiTHUMDER_CycleClockDiagram {
+realStep: number
+instructions: number
-table: PixiTHUMDER_Table
-tableSteps: PixiTHUMDER_Table
-tableInstructions: PixiTHUMDER_Table
-arrows: PIXI.Graphics[]
-arrowsContainer: PIXI.Container
-borderTitle: PIXI.Graphics
-borderLeft: PIXI.Graphics
-borderTop: PIXI.Graphics
-stepToStart: number
-last: number
+borderTopWidth: number
+borderLeftHeight: number
+reset(): void
-initTables(): void
-drawArrow(arrowDirection: TypeArrowDirection, color?: number): void
-drawBorders(): void
-drawSteps(displayStep?: number): void
-drawInstruction(textValue: string): void
+nextStep(pipeline: TypePipeline, step?: number): void
+addInstruction(text: string): void
+addArrow(instructionArrow: TypeArrowDirection, color: number): void
+moveLeft(): void
+moveRight(): void
+moveTop(): void
+moveBottom(): void
+debug(): void
+draw(): PIXI.Container
+toString(): string
-{static} drawCycle(code?: TypePipelineStage | TypeStall): PIXI.Graphics
}
@enddef
9 changes: 5 additions & 4 deletions UML/Playground.puml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
@startuml
hide class fields
hide class method
hide interface fields
hide interface method
'hide class fields
'hide class method
'hide interface fields
'hide interface method

skinparam linetype ortho

class CoreModule
Expand Down
11 changes: 6 additions & 5 deletions UML/THUMDER-core-Auth.puml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
@startuml
hide class fields
hide class method
hide interface fields
hide interface method

!theme plain
'hide class fields
'hide class method
'hide interface fields
'hide interface method
skinparam defaultFontName "JetBrains Mono"
skinparam linetype ortho

package Auth #DDDDDD {
Expand Down
Loading

0 comments on commit f8de3f8

Please sign in to comment.