@@ -4,130 +4,134 @@ This document outlines the permanent architecture of the system, including core
44
55## Core System Components
66
7- The following diagram shows the high-level architecture of active system components and their relationships:
8-
97``` mermaid
10- graph LR
11- %% Core System Components
8+ graph TB
9+ %% Core Components
1210 subgraph Core ["Core System"]
13- direction LR
1411 NS["newstartup.m"]
15- F["flush.m"]
16- R["rows.m"]
17- end
18-
19- subgraph Settings ["Settings Module"]
20- direction LR
21- SM["Settings.m"]
22- BS["bSettings.m"]
23- SC["SettingsObject"]
12+ Settings["Settings Module"]
2413 end
2514
2615 subgraph Protocols ["Protocol System"]
27- direction LR
28- subgraph Base ["Base Classes"]
29- PO["@protocolobj"]
30- NP["@nprotocol"]
31- end
16+ Base["@protocolobj"]
3217
3318 subgraph Active ["Active Protocols"]
34- direction LR
35- CL["@Classical"]
36- PS["@Psychometric"]
19+ AD["@AthenaDelayComp"]
20+ SC["@SoundCatContinuous"]
3721 AC["@ArpitCentrePokeTraining"]
3822 end
39-
40- subgraph Plugins ["Protocol Plugins"]
41- direction LR
42- PP["pokesplot"]
43- SL["saveload"]
44- SM2["sessionmodel"]
45- SW["soundmanager"]
46- SU["soundui"]
47- WA["water"]
48- end
4923 end
5024
51- %% Relationships
52- NS --> SM
53- NS --> BS
54- BS --> SC
55-
56- %% Protocol relationships
57- Active --> PO
58- Active --> NP
59- Active --> Plugins
60- Active --> F
61- Active --> R
62-
63- %% Module relationships
64- NS --> |"Loads"| Protocols
65- SM --> |"Configures"| Protocols
25+ %% Essential Plugin Groups
26+ subgraph Essential ["Essential Plugins"]
27+ UI["UI Plugins"]
28+ Data["Data Handling"]
29+ Sound["Sound Management"]
30+ Control["Control Plugins"]
31+ end
6632
33+ %% Key Relationships
34+ NS --> Settings
35+ NS --> Protocols
36+ Active --> Base
37+ Active --> Essential
38+
6739 %% Style
68- classDef default fill:#f9f9f9,stroke:#333,stroke-width:1px;
69- classDef core fill:#e6ffe6,stroke:#060,stroke-width:2px;
70- classDef settings fill:#e6e6ff,stroke:#006,stroke-width:2px;
71- classDef protocols fill:#ffe6e6,stroke:#600,stroke-width:2px;
40+ classDef default fill:#f9f9f9,stroke:#333,stroke-width:1px
41+ classDef core fill:#e6ffe6,stroke:#060,stroke-width:2px
42+ classDef active fill:#ffe6e6,stroke:#600,stroke-width:1px
7243
73- class Core core;
74- class Settings settings;
75- class Protocols protocols;
44+ class Core,Settings core
45+ class Active active
7646```
7747
78- ### Component Descriptions
48+ ## Protocol Plugin Details
7949
80- 1 . ** Core System**
81- - ` newstartup.m ` : Core system initialization script that sets up paths, loads settings, and prepares the environment
82- - ` flush.m ` : Handles flushing operations, used extensively in protocol files
83- - ` rows.m ` : Provides matrix operation functionality used throughout the codebase
50+ ``` mermaid
51+ graph LR
52+ %% Plugin Categories
53+ subgraph UI ["UI Plugins"]
54+ direction TB
55+ pokesplot2
56+ soundui
57+ distribui
58+ punishui
59+ end
60+
61+ subgraph Data ["Data Handling"]
62+ direction TB
63+ saveload
64+ sessionmodel
65+ sqlsummary
66+ comments
67+ end
8468
85- 2 . ** Settings Module**
86- - ` Settings.m ` : Main settings management module
87- - ` bSettings.m ` : Base settings configuration
88- - These components work together to maintain system configuration
69+ subgraph Sound ["Sound Management"]
70+ direction TB
71+ soundmanager
72+ soundtable
73+ end
8974
90- ## System Startup Sequence
75+ subgraph Control ["Control Plugins"]
76+ direction TB
77+ water
78+ antibias
79+ reinforcement
80+ end
9181
92- The following sequence diagram illustrates the system initialization process:
82+ %% Protocol Usage
83+ AD["@AthenaDelayComp"] --> UI & Data & Sound & Control
84+ SC["@SoundCatContinuous"] --> UI & Data & Sound & Control
85+ AC["@ArpitCentrePokeTraining"] --> UI & Data & Sound
86+
87+ %% Style
88+ classDef group fill:#f9f9f9,stroke:#333,stroke-width:1px
89+ classDef proto fill:#ffe6e6,stroke:#600,stroke-width:1px
90+
91+ class UI,Data,Sound,Control group
92+ class AD,SC,AC proto
93+ ```
94+
95+ ## System Startup Flow
9396
9497``` mermaid
9598sequenceDiagram
96- participant U as User
97- participant NS as newstartup.m
98- participant S as Settings.m
99- participant BS as bSettings.m
100- participant P as Protocols
101- participant D as Dispatcher
102-
103- U->>NS: Start System
104- NS->>BS: Load Settings Files
105- BS->>S: Initialize Settings
106- S->>BS: Load Base Settings
107- NS->>P: Configure Protocol Paths
108- P->>D: Register Available Protocols
109- D->>NS: Ready State
110- NS->>U: System Ready
99+ participant User
100+ participant System as newstartup.m
101+ participant Settings
102+ participant Protocols
103+
104+ User->>System: Start
105+ System->>Settings: Load Configuration
106+ System->>Protocols: Initialize
107+ Protocols-->>System: Ready
108+ System-->>User: System Ready
111109```
112110
113- ### Startup Process Details
111+ ## Key Components
112+
113+ 1 . ** Core System**
114+ - ` newstartup.m ` : System initialization
115+ - Settings Module: Configuration management
114116
115- 1 . ** System Initialization**
116- - User triggers system start
117- - ` newstartup.m ` begins initialization sequence
117+ 2 . ** Active Protocols**
118+ - ` @AthenaDelayComp ` : Full plugin suite
119+ - ` @SoundCatContinuous ` : Full plugin suite
120+ - ` @ArpitCentrePokeTraining ` : Basic plugin set
118121
119- 2 . ** Settings Configuration**
120- - Settings module is initialized
121- - Base settings are loaded and configured
122- - System paths are established
122+ 3 . ** Plugin Categories**
123+ - UI: Visual interfaces and plotting
124+ - Data: Storage and session management
125+ - Sound: Audio control and management
126+ - Control: Hardware and behavior control
123127
124- 3 . ** Protocol Loading**
125- - Protocol paths are configured
126- - Active protocols are made available
128+ ## Plugin Usage
127129
128- 4 . ** System Ready State**
129- - All components initialized
130- - System ready for operation
130+ | Protocol | UI | Data | Sound | Control |
131+ | ----------| -------| --------| --------| ----------|
132+ | AthenaDelayComp | ✓ | ✓ | ✓ | ✓ |
133+ | SoundCatContinuous | ✓ | ✓ | ✓ | ✓ |
134+ | ArpitCentrePokeTraining | ✓ | ✓ | ✓ | - |
131135
132136## Dependencies and Requirements
133137
@@ -168,46 +172,54 @@ sequenceDiagram
168172## Protocol Class Hierarchy
169173
170174``` mermaid
171- graph TD
172- subgraph Base ["Base Protocol Classes"]
173- PO["@protocolobj"]
174- NP["@nprotocol"]
175- end
176-
177- subgraph Plugins ["Protocol Plugins"]
178- PP["pokesplot"]
175+ graph LR
176+ %% Base Protocol
177+ Base["@protocolobj"]
178+
179+ %% Active Protocols
180+ AD["@AthenaDelayComp"]
181+ SC["@SoundCatContinuous"]
182+ AC["@ArpitCentrePokeTraining"]
183+
184+ %% Plugin Groups
185+ subgraph Core ["Core Plugins"]
186+ direction TB
187+ PP["pokesplot2"]
179188 SL["saveload"]
180189 SM["sessionmodel"]
181190 SW["soundmanager"]
182191 SU["soundui"]
183192 WA["water"]
193+ end
194+
195+ subgraph Extended ["Extended Plugins"]
196+ direction TB
184197 DU["distribui"]
198+ PU["punishui"]
185199 CO["comments"]
186200 ST["soundtable"]
187201 SQ["sqlsummary"]
202+ RF["reinforcement"]
203+ AB["antibias"]
188204 end
189205
190- subgraph Active ["Active Protocol Classes"]
191- CL["@Classical"]
192- PS["@Psychometric"]
193- AC["@ArpitCentrePokeTraining"]
194- end
206+ %% Inheritance
207+ AD --> Base
208+ SC --> Base
209+ AC --> Base
195210
196- %% Inheritance/Usage
197- CL --> PO
198- PS --> PO
199- AC --> PO
200-
201- CL --> PP & SL & SM & SW & SU & WA & DU & CO & ST & SQ
202- PS --> PP & SL & SM & SW & SU & WA
203- AC --> PP & SL & SM & SW & SU & WA & DU & CO & ST & SQ
211+ %% Plugin Usage
212+ AD --> Core & Extended
213+ SC --> Core & Extended
214+ AC --> Core
215+ AC --> CO & ST & SQ & AB
204216
205217 %% Style
206- classDef base fill:#e6ffe6,stroke:#060,stroke-width:2px;
207- classDef plugin fill:#e6e6ff ,stroke:#006 ,stroke-width:2px;
208- classDef active fill:#ffe6e6 ,stroke:#600 ,stroke-width:2px;
218+ classDef base fill:#e6ffe6,stroke:#060,stroke-width:2px
219+ classDef active fill:#ffe6e6 ,stroke:#600 ,stroke-width:1px
220+ classDef plugin fill:#e6e6ff ,stroke:#006 ,stroke-width:1px
209221
210- class Base base;
211- class Plugins plugin;
212- class Active active;
222+ class Base base
223+ class AD,SC,AC active
224+ class Core,Extended plugin
213225```
0 commit comments