Chapter 3 Structure


3.1 Directory structure

The main directory structure (with files) is shown below.

.
│   .gitignore
│   AcqRunningGuiFormat.m
│   AcqStoppedGuiFormat.m
│   AfDaq.fig
│   AfDaq.m
│   Arduino.m
│   CalculateResults.m
│   CODE_OF_CONDUCT.md
│   DefaultSettings.m
│   Help.fig
│   Help.m
│   InitializeGui.m
│   InitializeVariables.m
│   LICENSE
│   LogDataTemplate.xlsx
│   NumberOfActiveChannels.m
│   README.md
│   scratchpad.m
│
├───Analysis
│       jitter_calculation.m
│
├───docs
│
├───docs_source
│
└───LoggedData
        20200618151224Sub1.xlsx

An overview of what each of these does is described in the following tables.

Table 3.1: Description of core files/folders
FILE / DIRECTORY DESCRIPTION
AcqRunningGuiFormat.m Function file that defines the state of the GUI when data acquisition is running.
AcqStoppedGuiFormat.m Function file that defines the state of the GUI when data acquisition is stopped.
AfDaq.fig Design file that holds the layout of the GUI. It is created by GUIDE. It is required if further changes to GUI are needed. It is programmatically created by GUIDE and should not be modified outside the GUIDE environment. The AfDaq can be started by opening this file.
AfDaq.m Function file that holds the callback functions and/or the user-defined functions which define the logic to interact with GUI. It is programmatically created by GUIDE during the first run and later modified by GUIDE as per changes in AfDaq.fig. The AfDaq can be started by executing this file from the editor window.
Arduino.m Function file that defines the logic to connect with the Arduino board.
CalculateResults.m Function file that calculates the final results like recorded session duration, sampling frequency, number of samples, and data quality.
DefaultSettings.m Function file to hold the default settings of the GUI.
Help.fig Design file that holds the layout of the help GUI.
Help.m Function file that holds the callback functions of the help GUI.
InitializeGui.m Function file that initializes the GUI to a default state.
InitializeVariables.m Function file that initializes variable to their default state.
LogDataTemplate.xlsx Excel file that is used as a template to fill data during logging.
NumberOfActiveChannels.m Function file to compute the number of active channels used for data acquisition.
Table 3.2: Description of optional files/folders
FILE / DIRECTORY DESCRIPTION
.gitignore File used by git to ignore specific files/folders from version control.
CODE_OF_CONDUCT.md File defining the code of conduct for contributions.
LICENSE File defining the terms and conditions of license for this project.
README.md File defining a short introduction to the project.
scratchpad.m File used as temporary code storage/testing.
Analysis/jitter_calculation.m Function file used to compute and analyze the jitter associated with the data acquisition.
docs/ Documentation folder
docs_source/ Source of documentation. The bookdown package in R is used to create the documentation.
LoggedData Folder where data is saved during logging. If not exists, this folder is automatically created during the logging process.
LoggedData/20200618151224Sub1.xlsx File with logged data provided for example purpose.

3.2 Dependencies

Here discussed what functions and scripts AfDaq is dependent upon. The [fList,pList] = matlab.codetools.requiredFilesAndProducts('AfDaq.fig'); function is used to generate the list of dependencies.

List of MathWorks products possibly required

  • MATLAB - ver.9.3
  • Control System Toolbox - ver.10.3
  • Data Acquisition Toolbox - ver.3.12
  • Instrument Control Toolbox - ver.3.12

List of user-authored MATLAB program files required

'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\ArduinoConstants.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\BaseClass.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\BluetoothDeviceTypeEnum.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\BluetoothHostTransportLayer.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\BoardInfo.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\ConnectionTypeEnum.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\LinuxUtility.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\MWProtocol.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\MacUtility.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\ProtocolBase.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\ResourceManager.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\SerialHostTransportLayer.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\TCPHostTransportLayer.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\TabCompletionHelper.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\TransportLayerBase.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\Utility.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\UtilityCreator.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\WiFiEncryptionTypeEnum.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\WiFiStatusEnum.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\WindowsUtility.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\encode.p'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\endsWith.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\getDefaultLibraryPropertyValue.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\getFullLibraryList.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\getLibraryClassName.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\isICTInstalled.p'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\localizedError.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\renderArrayOfIntsToCharVector.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\renderCellArrayOfCharVectorsToCharVector.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\searchDefaultPropertyValue.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\validateDigitalParameter.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\validateDoubleParameterRanged.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\validateInputPin.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\validateIntArrayParameterRanged.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+internal\validateIntParameterRanged.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\+setup\+internal\HardwareInterface.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\AddonBase.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\FilePath.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\IDERoot.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\LibraryBase.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\PackageRoot.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\SPPKGRoot.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\Servo.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\ServoMotorBase.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\i2cdev.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\rotaryEncoder.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\shiftRegister.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\+arduinoio\spidev.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\@arduino\arduino.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\matlab\hardware\supportpackages\arduinoio\listArduinoLibraries.m'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\realtime\targets\arduinoide\+ide\+internal\getArduinoIDERootDir.p'
'C:\ProgramData\MATLAB\SupportPackages\R2017b\toolbox\realtime\targets\arduinoide\+ide\+internal\getArduinoSAMRootDir.p'
'C:\Users\Kulbhushan\Documents\My-Projects\AfDaq\AcqRunningGuiFormat.m'
'C:\Users\Kulbhushan\Documents\My-Projects\AfDaq\AcqStoppedGuiFormat.m'
'C:\Users\Kulbhushan\Documents\My-Projects\AfDaq\AfDaq.fig'
'C:\Users\Kulbhushan\Documents\My-Projects\AfDaq\AfDaq.m'
'C:\Users\Kulbhushan\Documents\My-Projects\AfDaq\Arduino.m'
'C:\Users\Kulbhushan\Documents\My-Projects\AfDaq\CalculateResults.m'
'C:\Users\Kulbhushan\Documents\My-Projects\AfDaq\DefaultSettings.m'
'C:\Users\Kulbhushan\Documents\My-Projects\AfDaq\Help.fig'
'C:\Users\Kulbhushan\Documents\My-Projects\AfDaq\Help.m'
'C:\Users\Kulbhushan\Documents\My-Projects\AfDaq\InitializeGui.m'
'C:\Users\Kulbhushan\Documents\My-Projects\AfDaq\InitializeVariables.m'
'C:\Users\Kulbhushan\Documents\My-Projects\AfDaq\NumberOfActiveChannels.m'