PES 4 - Smart Medication Dispenser / PES4_ProgrammeforDesignReview2

Dependencies:   SDFileSystem mbed

Fork of PES4_Programme by PES 4 - Smart Medication Dispenser

Committer:
itslinear
Date:
Thu Apr 05 20:01:17 2018 +0000
Revision:
66:0d43bd7ed179
Parent:
65:49eb0934f772
Child:
73:7fd3701def5b
write_medProtocol/delete_medProtocol/write_medInventory/write_medError/delete_medError added

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cittecla 51:a98ffbd41e76 1 #pragma once
cittecla 51:a98ffbd41e76 2 #include "SDFileSystem.h"
cittecla 51:a98ffbd41e76 3 #include "mbed.h"
cittecla 53:1c61cadbcb35 4 #include "variables.h"
cittecla 51:a98ffbd41e76 5
cittecla 53:1c61cadbcb35 6 #define STR_LEN 32
cittecla 53:1c61cadbcb35 7 #define TOKEN ";"
cittecla 51:a98ffbd41e76 8
cittecla 51:a98ffbd41e76 9 void writeTest();
cittecla 51:a98ffbd41e76 10 void readTest();
cittecla 51:a98ffbd41e76 11 void testSd();
itslinear 64:ca667234c845 12
cittecla 53:1c61cadbcb35 13 s_user readMedication(int user);
itslinear 64:ca667234c845 14 int writeMedication(int user,s_user userfile);
cittecla 51:a98ffbd41e76 15
itslinear 66:0d43bd7ed179 16
itslinear 66:0d43bd7ed179 17 /* Write medication protocol to sd card
itslinear 66:0d43bd7ed179 18 * @param: user -> 0 or 1
itslinear 66:0d43bd7ed179 19 * @param: s_time medicationTime -> planned time
itslinear 66:0d43bd7ed179 20 * @param: s_time outputTime -> current time
itslinear 66:0d43bd7ed179 21 * @param: s_medContainer -> number of each pill
itslinear 66:0d43bd7ed179 22 * @param: success -> output=1 / no-output=0
itslinear 66:0d43bd7ed179 23 */
itslinear 66:0d43bd7ed179 24 int write_medProtocol(s_time medicationTime, s_time outputTime, s_medContainer medication, int success, char user);
itslinear 66:0d43bd7ed179 25
itslinear 66:0d43bd7ed179 26 /* Delete medication protocol from sd card
itslinear 66:0d43bd7ed179 27 */
itslinear 66:0d43bd7ed179 28 int delete_medProtocol();
itslinear 66:0d43bd7ed179 29
itslinear 66:0d43bd7ed179 30 /* Write inventory protocol to sd card / Note first read_medInventory then ajust the numbers (stock - output) and then write them back to the protocol
itslinear 66:0d43bd7ed179 31 * @param: s_medContainer -> number of each pill in stock
itslinear 66:0d43bd7ed179 32 * @param: s_time -> current time
itslinear 66:0d43bd7ed179 33 * @param: char med1-med6 -> name of each pill
itslinear 66:0d43bd7ed179 34 */
itslinear 66:0d43bd7ed179 35 int write_medInventory(s_medContainer medInventory, s_time currentTime, char med1[], char med2[], char med3[], char med4[], char med5[], char med6[]);
itslinear 66:0d43bd7ed179 36
itslinear 66:0d43bd7ed179 37 /* Write occuring error to sd card protocol
itslinear 66:0d43bd7ed179 38 * @param: error -> string
itslinear 66:0d43bd7ed179 39 * @param: s_time -> current time
itslinear 66:0d43bd7ed179 40 */
itslinear 66:0d43bd7ed179 41 int write_medError(char error[], s_time time);
itslinear 66:0d43bd7ed179 42
itslinear 66:0d43bd7ed179 43 /* Delete error protocol from sd card
itslinear 66:0d43bd7ed179 44 */
itslinear 66:0d43bd7ed179 45 int delete_medError();
itslinear 66:0d43bd7ed179 46
itslinear 66:0d43bd7ed179 47 /* Read medication protocol from sd card
itslinear 66:0d43bd7ed179 48 * @param: user -> 0 or 1
itslinear 66:0d43bd7ed179 49 */
itslinear 64:ca667234c845 50 char read_medProtocol(char user);
itslinear 65:49eb0934f772 51
itslinear 66:0d43bd7ed179 52 /* Read inventory protocol from sd card
itslinear 66:0d43bd7ed179 53 */
itslinear 64:ca667234c845 54 char read_medInventory();
itslinear 65:49eb0934f772 55
itslinear 66:0d43bd7ed179 56 /* Read error protocol from sd card
itslinear 66:0d43bd7ed179 57 */
itslinear 64:ca667234c845 58 char read_medError();
itslinear 66:0d43bd7ed179 59