# MSC Cal Notes 

## Software Execution


1. Process Arguments
   1. MSC com port
   2. CTD com port
2. Get MSC Sampler Parameters
   1. User enters in variables
      1. MSC Serial Number
      2. Sample rate in minutes
      3. Sample mode (ISUS/DURA)
      4. If no CTD, enter solution temp/salinity
      5. Request a second sample with pump on
      
3. Init Comms to CTD
4. Init Comms to MSC
5. Set time on the MSC
6. Check For previous log files on MSC
7. Get the configuration info on MSC
8. Get the sample period
9. Enter the sampling thread timing
   1.  While sampling check for keyboard input
       1.  keyboard inputs can pause/enter interactive, or force a sample
   2.  sampling on fixed timer execution


## Sample Thread ##

1. Wakes MSC
2. Samples CTD
3. Parses CTD
4. Sends CTD to MSC
   1. or sends user entered values
5. Collect MSC Sample CTD Pump off
6. Collect MSC Sample Pump on
7. Sleep


T2,1580155271,25.123,33.456,1000.789