CMPT 433 Assignment 2 Marking Guide Assignment must be done individually or in pairs. Total: [125] Marks [115] Light Sampler [10] Design/Style Good modular design such as: - clean interfaces (.h clear enough to not need to read .c files) - hiding all threads inside modules (or potentially a module of threads, if all info about threads hidden) - modules and exported functions have great names Code Quality (Up to a -25 mark penalty for poor code quality. Some specifics: - Each .h file must have a description about what that module does. (Max -5) - Functions which are not in the .h file have internal linkage. (Max -5) - Great function, and variable names. (Max -5) - No magic numbers; 0, 1, -1 2 often OK. (Max -5) - No very large cryptic functions, no deep nesting of code, great indentation, .... (Max -5) [30] Sampling Correct data sampling: correct values read and stored, reasonable timing. Must achieve at least 250 samples per second Test by using the UDP "history" command, viewed using the python script. Test by blocking/unblocking light to ensure dips stops/start, etc. [10] Dip Detection Correctly uses thresholds and hysteresis to detect dips reliably up to ~20hz Check the value as it is displayed on serial port and/or terminal. Can test with a phone strobe light app, or using LED [10] Terminal Correct output on the terminal; including: - POT value, desired flashing Hz, and dip count - timing for sampling (min, max, avg, # samples) - 10 samples collected during the previous second, ~evenly spaced across data [40] Zen Cape and LED [ 5] Read POT. [10] Flash bread-board mounted LED at correct frequency using PWM [25] Display # dips using both digits (minor flicker acceptable) Must make config-pin calls to configure pins for i2c (cannot assume already done) [15] UDP socket [12] 2 marks per command: help/?, count, length, dips, , stop [ 3] Correctly displays error message for bad commands, such as "oops" [ 0] Memory Up to a -20 penalty applied for memory errors found with valgrind. Note: No deduction for memory still reachable for call stacks involving pthread_cancel_init. [10] Debug noworky [5] GDB text capture - Show reasonable detail to discover the bug. - Expecting use of at least: bt, list, up, print. [3] Graphical Debugger - Screenshot shows noworky being debugged through Eclipse (or another graphical debugger). [2] noworky.c - Must have corrected and commented the change. - If the bug is resolved in a different (yet equally direct way) as expected, it will also be worth full marks. (Graphical debugger screenshot will not show the sequence of steps used to debug the application; just that the debugger is connected) Forward to Dr. Brian if... - Material is suspiciously similar to another submission. - Inconsistent submission (inconsistent trace indicating results are forged). - All proven cases of academic dishonesty will be dealt with according to SFU's Academic Honesty policy: http://www.sfu.ca/policies/gazette/student.html