Skip to content

Commit

Permalink
#27 - Added remainder of workout goal capabilities. Ready to begin
Browse files Browse the repository at this point in the history
testing in Verifier.  Have not yet modified Java animation of the watch
to support newly defined indicator (down, flat, up) which will be used
to provide a visual indication of goal achievement.
  • Loading branch information
John Wolfe committed Jul 11, 2014
1 parent f16b7ff commit 1eb70d3
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ INSERT INTO SPR_RO
'getLocation',
'',
'',
3);
1);
INSERT INTO C_EP_PROXY
VALUES ("244d2b45-5908-40ff-99d3-a37dc791609a",
"de38d4b0-e70e-49ee-a5b9-590645243ae5",
Expand Down Expand Up @@ -782,6 +782,23 @@ INSERT INTO C_EP_PROXY
'startTest',
'',
'../../UIInterfaces/UI/UI.xtuml');
INSERT INTO SPR_REP
VALUES ("5f7ab889-a4f4-42b2-b9f0-a27fd3fd8c85",
"40870179-79b6-44a6-a9e4-b4e5dd344842",
"f093414e-3df2-4f9c-a0b4-61ba8e8a6ed9");
INSERT INTO SPR_RO
VALUES ("5f7ab889-a4f4-42b2-b9f0-a27fd3fd8c85",
'setInidicator',
'',
'',
3);
INSERT INTO C_EP_PROXY
VALUES ("40870179-79b6-44a6-a9e4-b4e5dd344842",
"06e358bd-8488-4092-af9c-7c359b158f4d",
-1,
'setInidicator',
'',
'../../UIInterfaces/UI/UI.xtuml');
INSERT INTO C_I_PROXY
VALUES ("06e358bd-8488-4092-af9c-7c359b158f4d",
"00000000-0000-0000-0000-000000000000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ select any session from instances of WorkoutSession;
if (not empty session)
speed = session.currentSpeed;
end if;
send UI::setData(value: speed, unit: Unit::kmPerHour);',
send UI::setData(value: speed, unit: Unit::kmPerHour);
send UI::setIndicator( indicator: Display::goalDispositionIndicator() );',
'');
INSERT INTO SM_MOAH
VALUES ("98bf84d6-1cee-4a42-88d2-9367aa5ff2c7",
Expand All @@ -308,7 +309,8 @@ if (not empty session)
pace = session.currentPace;
end if;

send UI::setData(value: pace, unit: Unit::minPerKm);',
send UI::setData(value: pace, unit: Unit::minPerKm);
send UI::setIndicator( indicator: Display::goalDispositionIndicator() );',
'');
INSERT INTO SM_MOAH
VALUES ("82ae96eb-a18e-470a-bcd7-4e7b27e29390",
Expand All @@ -327,7 +329,8 @@ if (not empty session)
heartRate = session.currentHeartRate;
end if;

send UI::setData(value: heartRate, unit: Unit::bpm);',
send UI::setData(value: heartRate, unit: Unit::bpm);
send UI::setIndicator( indicator: Display::goalDispositionIndicator() );',
'');
INSERT INTO SM_MOAH
VALUES ("2370d1a4-2f63-477b-b55f-16f87477e1bc",
Expand Down Expand Up @@ -491,7 +494,7 @@ INSERT INTO GD_MD
0,
0,
0,
'4.1.10',
'4.1.12',
'GPS Watch::Library::Tracking::Tracking::Display::Class State Machine');
INSERT INTO GD_GE
VALUES ("7aa1a79a-0493-4554-a792-cdb82b5c7cb0",
Expand Down Expand Up @@ -1883,6 +1886,4 @@ INSERT INTO O_OBJ_PROXY
'Display',
'Controls the currently displayed measurement.',
"00000000-0000-0000-0000-000000000000",
"00000000-0000-0000-0000-000000000000",
"15cd4220-e58d-3b4c-3acb-5eeed03d2b03",
'../Display.xtuml');
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,42 @@ INSERT INTO O_OBJ
6,
'Display',
'Controls the currently displayed measurement.',
"00000000-0000-0000-0000-000000000000");
INSERT INTO O_TFR
VALUES ("a29d7ebd-8df6-44b9-a088-55d69709c957",
"e4f33430-b3cd-4e2a-8dff-b91094d7d095",
'goalDispositionIndicator',
'',
"0c2280ac-677d-4cc7-a34f-fde18b6c9506",
0,
'// Return the indicator value representing the disposition of
// the currently executing goal.

// Find the currently executing goal associated with the singleton
// instance of the workout session.
select any session from instances of WorkoutSession;
select one goal related by session->Goal[R11.''is currently executing''];

// Convert the disposition of the currently executing goal
// to a UI indicator.
indicator = Indicator::Flat;
if ( goal.disposition == GoalDisposition::Increase )
indicator = Indicator::Up;
elif ( goal.disposition == GoalDisposition::Decrease )
indicator = Indicator::Down;
end if;

return( indicator );',
1,
'',
"00000000-0000-0000-0000-000000000000");
INSERT INTO S_DT_PROXY
VALUES ("0c2280ac-677d-4cc7-a34f-fde18b6c9506",
"00000000-0000-0000-0000-000000000000",
"00000000-0000-0000-0000-000000000000",
"15cd4220-e58d-3b4c-3acb-5eeed03d2b03");
'Indicator',
'Graphical indicator.',
'',
'../../../../UIDataTypes/UIDataTypes.xtuml');
INSERT INTO O_ID
VALUES (0,
"e4f33430-b3cd-4e2a-8dff-b91094d7d095");
Expand Down
17 changes: 17 additions & 0 deletions applications/gps/GPS Watch/models/GPS Watch/Library/UI/UI.xtuml
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,23 @@ INSERT INTO C_EP_PROXY
'startTest',
'',
'../../UIInterfaces/UI/UI.xtuml');
INSERT INTO SPR_PEP
VALUES ("f6491653-ca13-4746-8e74-1814fca55f86",
"40870179-79b6-44a6-a9e4-b4e5dd344842",
"4bf1a145-d815-460c-a4df-745f6e8974a0");
INSERT INTO SPR_PO
VALUES ("f6491653-ca13-4746-8e74-1814fca55f86",
'setInidicator',
'',
'',
3);
INSERT INTO C_EP_PROXY
VALUES ("40870179-79b6-44a6-a9e4-b4e5dd344842",
"06e358bd-8488-4092-af9c-7c359b158f4d",
-1,
'setInidicator',
'',
'../../UIInterfaces/UI/UI.xtuml');
INSERT INTO C_I_PROXY
VALUES ("06e358bd-8488-4092-af9c-7c359b158f4d",
"00000000-0000-0000-0000-000000000000",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- BP 7.1 content: Package syschar: 3 persistence-version: 7.1.6
-- BP 7.1.6 content: Package syschar: 3 persistence-version: 7.1.6

INSERT INTO EP_PKG
VALUES ("7e10fb9d-9dc9-4b77-b365-4e2a652c45da",
Expand All @@ -21,8 +21,8 @@ INSERT INTO GD_MD
1,
0,
0,
0,
0,
200,
150,
0,
'',
'GPS Watch::UIDataTypes');
Expand Down Expand Up @@ -50,6 +50,30 @@ INSERT INTO DIM_ELE
VALUES ("c571724b-5058-441f-9e17-fbf348d4388d",
0,
"00000000-0000-0000-0000-000000000000");
INSERT INTO GD_GE
VALUES ("01cb4227-01de-4938-8569-b51f5fdee962",
"bfa01727-03ae-480b-94a2-d62700de2635",
"0c2280ac-677d-4cc7-a34f-fde18b6c9506",
52,
0,
'GPS Watch::UIDataTypes::Indicator');
INSERT INTO GD_SHP
VALUES ("01cb4227-01de-4938-8569-b51f5fdee962");
INSERT INTO GD_NCS
VALUES ("01cb4227-01de-4938-8569-b51f5fdee962");
INSERT INTO DIM_ND
VALUES (200.000000,
150.000000,
"01cb4227-01de-4938-8569-b51f5fdee962");
INSERT INTO DIM_GE
VALUES (4552.000000,
3096.000000,
"01cb4227-01de-4938-8569-b51f5fdee962",
"00000000-0000-0000-0000-000000000000");
INSERT INTO DIM_ELE
VALUES ("01cb4227-01de-4938-8569-b51f5fdee962",
0,
"00000000-0000-0000-0000-000000000000");
INSERT INTO DIM_DIA
VALUES ("bfa01727-03ae-480b-94a2-d62700de2635",
'',
Expand Down Expand Up @@ -137,6 +161,38 @@ INSERT INTO PE_PE
"7e10fb9d-9dc9-4b77-b365-4e2a652c45da",
"00000000-0000-0000-0000-000000000000",
3);
INSERT INTO S_DT
VALUES ("0c2280ac-677d-4cc7-a34f-fde18b6c9506",
"00000000-0000-0000-0000-000000000000",
'Indicator',
'Graphical indicator.',
'');
INSERT INTO S_EDT
VALUES ("0c2280ac-677d-4cc7-a34f-fde18b6c9506");
INSERT INTO S_ENUM
VALUES ("6f056bda-b51d-49b8-80e6-e3252575303f",
'Down',
'A downward indicator: perhaps an arrow pointing down.',
"0c2280ac-677d-4cc7-a34f-fde18b6c9506",
"00000000-0000-0000-0000-000000000000");
INSERT INTO S_ENUM
VALUES ("5ac9a186-c6db-4585-b9f0-55b33f8f9188",
'Flat',
'A neutral indicator: perhaps a horizontal line or dash.',
"0c2280ac-677d-4cc7-a34f-fde18b6c9506",
"6f056bda-b51d-49b8-80e6-e3252575303f");
INSERT INTO S_ENUM
VALUES ("77c1c31d-c558-4feb-8ea1-780d12a75db4",
'Up',
'A downward indicator: perhaps an arrow pointing up.',
"0c2280ac-677d-4cc7-a34f-fde18b6c9506",
"5ac9a186-c6db-4585-b9f0-55b33f8f9188");
INSERT INTO PE_PE
VALUES ("0c2280ac-677d-4cc7-a34f-fde18b6c9506",
1,
"7e10fb9d-9dc9-4b77-b365-4e2a652c45da",
"00000000-0000-0000-0000-000000000000",
3);
INSERT INTO PE_PE
VALUES ("7e10fb9d-9dc9-4b77-b365-4e2a652c45da",
1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,36 @@ INSERT INTO C_IO
0,
'',
"f9a5672f-67fa-48da-8c7e-2a4cc64bf0fd");
INSERT INTO C_EP
VALUES ("40870179-79b6-44a6-a9e4-b4e5dd344842",
"06e358bd-8488-4092-af9c-7c359b158f4d",
-1,
'setIndicator',
'');
INSERT INTO C_IO
VALUES ("40870179-79b6-44a6-a9e4-b4e5dd344842",
"ba5eda7a-def5-0000-0000-000000000000",
'setIndicator',
'',
0,
'',
"b64e537b-ac94-4f65-90c0-8ac26c754583");
INSERT INTO C_PP
VALUES ("c4a6c7c1-4b0d-40e1-8607-c396f003179b",
"40870179-79b6-44a6-a9e4-b4e5dd344842",
"0c2280ac-677d-4cc7-a34f-fde18b6c9506",
'indicator',
'',
0,
'',
"00000000-0000-0000-0000-000000000000");
INSERT INTO S_DT_PROXY
VALUES ("0c2280ac-677d-4cc7-a34f-fde18b6c9506",
"00000000-0000-0000-0000-000000000000",
'Indicator',
'Graphical indicator.',
'',
'../../UIDataTypes/UIDataTypes.xtuml');
INSERT INTO PE_PE
VALUES ("06e358bd-8488-4092-af9c-7c359b158f4d",
1,
Expand Down

0 comments on commit 1eb70d3

Please sign in to comment.