2007-07-02 07:52:03 +02:00
// *++
2007-06-29 17:14:00 +02:00
//
2007-07-02 07:52:03 +02:00
// Copyright (c) 2006, Intel Corporation
// All rights reserved. This program and the accompanying materials
// are licensed and made available under the terms and conditions of the BSD License
// which accompanies this distribution. The full text of the license may be found at
// http://opensource.org/licenses/bsd-license.php
2007-06-29 17:14:00 +02:00
//
2007-07-02 07:52:03 +02:00
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
2007-06-29 17:14:00 +02:00
//
// Module Name:
//
2007-07-02 07:52:03 +02:00
// Vfr.vfr
//
2007-06-29 17:14:00 +02:00
// Abstract:
2007-07-02 07:52:03 +02:00
//
2007-06-29 17:14:00 +02:00
// Sample Setup formset
2007-07-02 07:52:03 +02:00
//
// Revision History:
//
2007-06-29 17:14:00 +02:00
// --*/
2007-07-02 07:52:03 +02:00
2007-06-29 17:14:00 +02:00
#include "NVDataStruc.h"
typedef struct {
UINT8 Field8;
UINT16 Field16;
UINT8 OrderedList[3];
} MyIfrNVData2;
typedef struct {
UINT8 Field8;
UINT16 Field16;
UINT8 OrderedList[3];
} MyIfrNVData3;
2007-07-02 07:52:03 +02:00
#define MY_TEXT_KEY 0x100
2007-06-29 17:14:00 +02:00
#define LABEL_1_VALUE 0x01
#define LABEL_2_VALUE 0x1000
#define LABEL_UPDATE_BBS 0x2222
#define LABEL_END_UPDATE_BBS 0x2223
2007-07-02 07:52:03 +02:00
formset
2007-06-29 17:14:00 +02:00
guid = FORMSET_GUID,
2007-07-02 07:52:03 +02:00
title = STRING_TOKEN(STR_FORM_SET_TITLE),
help = STRING_TOKEN(STR_FORM_SET_TITLE_HELP),
class = 0x10,
2007-06-29 17:14:00 +02:00
subclass = 0,
varstore MyIfrNVData2, key = 0x1234, name = MY_DATA2, guid = FORMSET_GUID;
2008-01-21 15:37:05 +01:00
// varstore MyIfrNVData, key = 0x1324, name = MY_DATA1, guid = FORMSET_GUID;
2007-06-29 17:14:00 +02:00
varstore MyIfrNVData3, key = 0x4321, name = MY_DATA3, guid = FORMSET_GUID;
form formid = 1,
title = STRING_TOKEN(STR_FORM1_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code
2007-07-02 07:52:03 +02:00
2007-06-29 17:14:00 +02:00
subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT);
subtitle text = STRING_TOKEN(STR_SUBTITLE_TEXT2);
2007-07-02 07:52:03 +02:00
banner
2007-06-29 17:14:00 +02:00
title = STRING_TOKEN(STR_BANNER_TITLE),
line 1,
align center;
2007-07-02 07:52:03 +02:00
banner
2007-06-29 17:14:00 +02:00
title = STRING_TOKEN(STR_BANNER_TITLE),
line 2,
align left;
2007-07-02 07:52:03 +02:00
banner
2007-06-29 17:14:00 +02:00
title = STRING_TOKEN(STR_BANNER_TITLE),
line 2,
align right;
2007-07-02 07:52:03 +02:00
text
help = STRING_TOKEN(STR_TEXT_HELP),
2007-06-29 17:14:00 +02:00
text = STRING_TOKEN(STR_CPU_STRING),
text = STRING_TOKEN(STR_CPU_STRING2),
flags = 0,
key = 0;
2007-07-02 07:52:03 +02:00
text
help = STRING_TOKEN(STR_EXIT_TEXT),
text = STRING_TOKEN(STR_EXIT_TEXT),
2007-06-29 17:14:00 +02:00
text = STRING_TOKEN(STR_EXIT_TEXT),
flags = INTERACTIVE,
key = 0x1237;
oneof varid = MyIfrNVData.SuppressGrayOutSomething,
prompt = STRING_TOKEN(STR_ONE_OF_PROMPT),
2007-07-02 07:52:03 +02:00
help = STRING_TOKEN(STR_ONE_OF_HELP),
option text = STRING_TOKEN(STR_ONE_OF_TEXT4), value = 0x0, flags = 0;
2007-06-29 17:14:00 +02:00
option text = STRING_TOKEN(STR_ONE_OF_TEXT5), value = 0x1, flags = 0;
option text = STRING_TOKEN(STR_ONE_OF_TEXT6), value = 0x2, flags = DEFAULT;
endoneof;
oneof varid = MyIfrNVData.BootOrderLarge,
prompt = STRING_TOKEN(STR_ONE_OF_PROMPT),
2007-07-02 07:52:03 +02:00
help = STRING_TOKEN(STR_ONE_OF_HELP),
option text = STRING_TOKEN(STR_BOOT_ORDER1), value = 0x0, flags = INTERACTIVE, key = 1;
2007-06-29 17:14:00 +02:00
option text = STRING_TOKEN(STR_BOOT_ORDER2), value = 0x1, flags = INTERACTIVE | DEFAULT, key = 2;
endoneof;
grayoutif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x1;
suppressif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x0;
label 0;
checkbox varid = MyIfrNVData.ChooseToActivateNuclearWeaponry,
prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT),
2007-07-02 07:52:03 +02:00
help = STRING_TOKEN(STR_CHECK_BOX_HELP),
2007-06-29 17:14:00 +02:00
flags = 1, // Flags behavior for checkbox is overloaded so that it equals a DEFAULT value. 1 = ON, 0 = off
key = 0,
endcheckbox;
endif;
//
2007-07-02 07:52:03 +02:00
// Ordered list:
2007-06-29 17:14:00 +02:00
// sizeof(MyIfrNVData) storage must be UINT8 array, and
// size written for the variable must be size of the entire
// variable.
//
//
suppressif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x0;
label LABEL_UPDATE_BBS;
orderedlist
varid = MyIfrNVData.BootOrder,
prompt = STRING_TOKEN(STR_BOOT_OPTIONS),
help = STRING_TOKEN(STR_NULL_STRING),
option text = STRING_TOKEN(STR_BOOT_OPTION2), value = 2, flags = RESET_REQUIRED;
option text = STRING_TOKEN(STR_BOOT_OPTION1), value = 1, flags = RESET_REQUIRED;
option text = STRING_TOKEN(STR_BOOT_OPTION3), value = 3, flags = RESET_REQUIRED;
option text = STRING_TOKEN(STR_BOOT_OPTION4), value = 4, flags = RESET_REQUIRED;
2007-07-02 07:52:03 +02:00
endlist;
2007-06-29 17:14:00 +02:00
label LABEL_END_UPDATE_BBS;
endif;
2007-07-02 07:52:03 +02:00
2007-06-29 17:14:00 +02:00
suppressif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x2;
2007-07-02 07:52:03 +02:00
orderedlist
2007-06-29 17:14:00 +02:00
varid = MyIfrNVData.OrderedList,
prompt = STRING_TOKEN(STR_TEST_OPCODE),
2007-07-02 07:52:03 +02:00
help = STRING_TOKEN(STR_TEXT_HELP),
2007-06-29 17:14:00 +02:00
option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 4, flags = RESET_REQUIRED;
option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 3, flags = RESET_REQUIRED;
option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 2, flags = RESET_REQUIRED;
option text = STRING_TOKEN(STR_TEXT_HELP), value = 1, flags = RESET_REQUIRED;
endlist;
endif;
2007-07-02 07:52:03 +02:00
2007-06-29 17:14:00 +02:00
label 100;
2007-07-02 07:52:03 +02:00
goto 0x1234,
prompt = STRING_TOKEN(STR_GOTO_DYNAMIC),
2007-06-29 17:14:00 +02:00
help = STRING_TOKEN(STR_GOTO_HELP),
2007-07-02 07:52:03 +02:00
flags = INTERACTIVE,
2007-06-29 17:14:00 +02:00
key = 0x1234;
2007-07-02 07:52:03 +02:00
goto 0x1234,
prompt = STRING_TOKEN(STR_GOTO_DYNAMIC2),
2007-06-29 17:14:00 +02:00
help = STRING_TOKEN(STR_GOTO_HELP),
2007-07-02 07:52:03 +02:00
flags = INTERACTIVE,
2007-06-29 17:14:00 +02:00
key = 0x1235;
2007-07-02 07:52:03 +02:00
2007-06-29 17:14:00 +02:00
//
// VARSTORE tests
//
// Till now, been using variable NvData (must be reserved)
// now we do a varselect for variable NvData3
inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),
ideqid MyIfrNVData3.Field16 == MyIfrNVData3.Field16
endif;
// now we do a varselect_pair for variable NvData2 and NvData3
inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),
ideqid MyIfrNVData2.Field16 == MyIfrNVData3.Field16
endif;
// now we do a varselect_pair for variable NvData and NvData2
// inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),
// ideqid MyIfrNVData2.Field16 == MyIfrNVData.TestLateCheck
// endif;
inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),
ideqid MyIfrNVData.TestLateCheck == MyIfrNVData.TestLateCheck2
endif;
oneof varid = MyIfrNVData.TestLateCheck,
prompt = STRING_TOKEN(STR_TEST_OPCODE),
2007-07-02 07:52:03 +02:00
help = STRING_TOKEN(STR_ONE_OF_HELP),
2007-06-29 17:14:00 +02:00
option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = LATE_CHECK | RESET_REQUIRED;
option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = LATE_CHECK | DEFAULT | RESET_REQUIRED;
endoneof;
oneof varid = MyIfrNVData.TestLateCheck2,
prompt = STRING_TOKEN(STR_TEST_OPCODE2),
2007-07-02 07:52:03 +02:00
help = STRING_TOKEN(STR_ONE_OF_HELP),
2007-06-29 17:14:00 +02:00
option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = LATE_CHECK | DEFAULT | RESET_REQUIRED;
option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = LATE_CHECK | RESET_REQUIRED;
endoneof;
oneof varid = MyIfrNVData.QuestionAboutTreeHugging,
prompt = STRING_TOKEN(STR_ONE_OF_PROMPT),
2007-07-02 07:52:03 +02:00
help = STRING_TOKEN(STR_ONE_OF_HELP),
2007-06-29 17:14:00 +02:00
option text = STRING_TOKEN(STR_ONE_OF_TEXT1), value = 0, flags = RESET_REQUIRED;
option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 1, flags = DEFAULT | RESET_REQUIRED;
option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 0x03, flags = RESET_REQUIRED;
endoneof;
string varid = MyIfrNVData.MyStringData,
prompt = STRING_TOKEN(STR_MY_STRING_PROMPT2),
help = STRING_TOKEN(STR_MY_STRING_HELP2),
flags = INTERACTIVE,
key = 0x1234,
minsize = 6,
maxsize = 0x14,
2007-07-02 07:52:03 +02:00
endstring;
2007-06-29 17:14:00 +02:00
2007-07-02 07:52:03 +02:00
text
help = STRING_TOKEN(STR_GRAYOUT_TEST),
2007-06-29 17:14:00 +02:00
text = STRING_TOKEN(STR_GRAYOUT_TEST),
text = STRING_TOKEN(STR_GRAYOUT_TEST),
flags = INTERACTIVE,
key = 0x1555;
2007-07-02 07:52:03 +02:00
text
help = STRING_TOKEN(STR_SUPPRESS_TEST),
2007-06-29 17:14:00 +02:00
text = STRING_TOKEN(STR_SUPPRESS_TEST),
text = STRING_TOKEN(STR_SUPPRESS_TEST),
flags = INTERACTIVE,
key = 0x1556;
2007-07-02 07:52:03 +02:00
text
help = STRING_TOKEN(STR_CLEAR_TEST),
2007-06-29 17:14:00 +02:00
text = STRING_TOKEN(STR_CLEAR_TEST),
text = STRING_TOKEN(STR_CLEAR_TEST),
flags = INTERACTIVE,
key = 0x1557;
grayoutif vareqval var(VAR_EQ_TEST_NAME) == 0x1;
2007-07-02 07:52:03 +02:00
suppressif vareqval var(VAR_EQ_TEST_NAME) == 0x1000;
2007-06-29 17:14:00 +02:00
label 30;
checkbox varid = MyIfrNVData.ChooseToActivateNuclearWeaponry,
prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT),
2007-07-02 07:52:03 +02:00
help = STRING_TOKEN(STR_CHECK_BOX_HELP),
2007-06-29 17:14:00 +02:00
flags = 1,
key = 0,
endcheckbox;
endif;
2007-07-02 07:52:03 +02:00
numeric varid = MyIfrNVData.HowOldAreYouInYearsManual,
2007-06-29 17:14:00 +02:00
prompt = STRING_TOKEN(STR_NUMERIC_MANUAL_PROMPT),
help = STRING_TOKEN(STR_NUMERIC_HELP0),
minimum = 0,
maximum = 0xf0, // 0xf0 = 240 in decimal
step = 0, // Stepping of 0 equates to a manual entering
// of a value, otherwise it will auto-increment
// with a left/right arrow
2007-07-02 07:52:03 +02:00
default = 21,
2007-06-29 17:14:00 +02:00
endnumeric;
2007-07-02 07:52:03 +02:00
numeric varid = MyIfrNVData.HowTallAreYouManual,
2007-06-29 17:14:00 +02:00
prompt = STRING_TOKEN(STR_TALL_MANUAL_PROMPT),
help = STRING_TOKEN(STR_NUMERIC_HELP1),
minimum = 0,
maximum = 300,
step = 0, // Stepping of 0 equates to a manual entering
// of a value, otherwise it will auto-increment
// with a left/right arrow
2007-07-02 07:52:03 +02:00
default = 175,
2007-06-29 17:14:00 +02:00
endnumeric;
inventory
help = STRING_TOKEN(STR_INVENTORY_HELP),
text = STRING_TOKEN(STR_INVENTORY_TEXT1),
text = STRING_TOKEN(STR_INVENTORY_TEXT2);
2007-07-02 07:52:03 +02:00
2007-06-29 17:14:00 +02:00
restore defaults,
formid = 4,
prompt = STRING_TOKEN(STR_RESTORE_DEFAULTS_PROMPT),
help = STRING_TOKEN(STR_RESTORE_DEFAULTS_HELP),
flags = 0,
key = 0;
save defaults,
formid = 4,
prompt = STRING_TOKEN(STR_SAVE_DEFAULTS_PROMPT),
help = STRING_TOKEN(STR_SAVE_DEFAULTS_HELP),
flags = 0,
key = 0;
2007-07-02 07:52:03 +02:00
//
2007-06-29 17:14:00 +02:00
// Case with no flags or key
//
save defaults,
formid = 4,
prompt = STRING_TOKEN(STR_SAVE_DEFAULTS_PROMPT),
help = STRING_TOKEN(STR_SAVE_DEFAULTS_HELP);
//
// Case with no key
//
save defaults,
formid = 4,
prompt = STRING_TOKEN(STR_SAVE_DEFAULTS_PROMPT),
help = STRING_TOKEN(STR_SAVE_DEFAULTS_HELP),
flags = 0;
//
// Case with no flags
//
save defaults,
formid = 4,
prompt = STRING_TOKEN(STR_SAVE_DEFAULTS_PROMPT),
help = STRING_TOKEN(STR_SAVE_DEFAULTS_HELP),
key = 0;
label LABEL_2_VALUE;
grayoutif ideqval MyIfrNVData.HowOldAreYouInYearsManual == 23 AND ideqval MyIfrNVData.SuppressGrayOutSomething == 0x1;
2007-07-02 07:52:03 +02:00
numeric varid = MyIfrNVData.HowOldAreYouInYears,
2007-06-29 17:14:00 +02:00
prompt = STRING_TOKEN(STR_NUMERIC_PROMPT),
help = STRING_TOKEN(STR_NUMERIC_HELP2),
minimum = 0,
maximum = 243,
step = 3,
default = 18,
endnumeric;
label LABEL_1_VALUE;
//
// Numeric with no step or default specified
//
2007-07-02 07:52:03 +02:00
numeric varid = MyIfrNVData.HowTallAreYou,
2007-06-29 17:14:00 +02:00
prompt = STRING_TOKEN(STR_NUMERIC_PROMPT1),
help = STRING_TOKEN(STR_NUMERIC_HELP3),
minimum = 0,
maximum = 190,
// step = 1, // Stepping of 1 if not specified
// default = minimum; // if not specified
endnumeric;
endif;
string varid = MyIfrNVData.MyStringData,
prompt = STRING_TOKEN(STR_MY_STRING_PROMPT),
help = STRING_TOKEN(STR_MY_STRING_HELP),
minsize = 6,
maxsize = 0x14,
2007-07-02 07:52:03 +02:00
endstring;
2007-06-29 17:14:00 +02:00
password varid = MyIfrNVData.WhatIsThePassword,
prompt = STRING_TOKEN(STR_PASSWORD_PROMPT),
help = STRING_TOKEN(STR_PASSWORD_HELP),
minsize = 6,
2007-07-02 07:52:03 +02:00
maxsize = 20, // new opcode
2007-06-29 17:14:00 +02:00
encoding = 1,
2007-07-02 07:52:03 +02:00
endpassword;
2007-06-29 17:14:00 +02:00
password varid = MyIfrNVData.WhatIsThePassword2,
prompt = STRING_TOKEN(STR_PASSWORD_PROMPT),
help = STRING_TOKEN(STR_PASSWORD_HELP),
minsize = 6,
2007-07-02 07:52:03 +02:00
maxsize = 20, // new opcode
2007-06-29 17:14:00 +02:00
encoding = 1,
2007-07-02 07:52:03 +02:00
endpassword;
2007-06-29 17:14:00 +02:00
//
// Test with flags and key fields
//
password varid = MyIfrNVData.WhatIsThePassword,
prompt = STRING_TOKEN(STR_PASSWORD_PROMPT),
help = STRING_TOKEN(STR_PASSWORD_HELP),
flags = INTERACTIVE,
key = 0x2000,
minsize = 6,
2007-07-02 07:52:03 +02:00
maxsize = 20, // new opcode
2007-06-29 17:14:00 +02:00
encoding = 1,
endpassword;
2007-07-02 07:52:03 +02:00
goto 2,
2007-06-29 17:14:00 +02:00
prompt = STRING_TOKEN(STR_GOTO_FORM2), //SecondSetupPage // this too has no end-op and basically it's a jump to a form ONLY
help = STRING_TOKEN(STR_GOTO_HELP);
2007-07-02 07:52:03 +02:00
goto 3,
2007-06-29 17:14:00 +02:00
prompt = STRING_TOKEN(STR_GOTO_FORM3), //ThirdSetupPage // this too has no end-op and basically it's a jump to a form ONLY
help = STRING_TOKEN(STR_GOTO_HELP);
endform;
2007-07-02 07:52:03 +02:00
form formid = 2, // SecondSetupPage,
2007-06-29 17:14:00 +02:00
title = STRING_TOKEN(STR_FORM2_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code
date year varid = Date.Year, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from
prompt = STRING_TOKEN(STR_DATE_PROMPT),
help = STRING_TOKEN(STR_DATE_YEAR_HELP),
minimum = 1998,
maximum = 2099,
step = 1,
default = 2004,
month varid = Date.Month, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from
prompt = STRING_TOKEN(STR_DATE_PROMPT),
help = STRING_TOKEN(STR_DATE_MONTH_HELP),
minimum = 1,
maximum = 12,
step = 1,
default = 1,
day varid = Date.Day, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from
prompt = STRING_TOKEN(STR_DATE_PROMPT),
help = STRING_TOKEN(STR_DATE_DAY_HELP),
minimum = 1,
maximum = 31,
step = 0x1,
default = 1,
enddate;
time hour varid = Time.Hours, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from
prompt = STRING_TOKEN(STR_TIME_PROMPT),
help = STRING_TOKEN(STR_TIME_HOUR_HELP),
minimum = 0,
maximum = 23,
step = 1,
default = 0,
minute varid = Time.Minutes, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from
prompt = STRING_TOKEN(STR_TIME_PROMPT),
help = STRING_TOKEN(STR_TIME_MINUTE_HELP),
minimum = 0,
maximum = 59,
step = 1,
default = 0,
second varid = Time.Seconds, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from
prompt = STRING_TOKEN(STR_TIME_PROMPT),
help = STRING_TOKEN(STR_TIME_SECOND_HELP),
minimum = 0,
maximum = 59,
step = 1,
default = 0,
endtime;
date year varid = Date.Year, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from
prompt = STRING_TOKEN(STR_DATE_PROMPT),
help = STRING_TOKEN(STR_DATE_YEAR_HELP),
minimum = 1939,
maximum = 2101,
step = 1,
default = 1964,
month varid = Date.Month, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from
prompt = STRING_TOKEN(STR_DATE_PROMPT),
help = STRING_TOKEN(STR_DATE_MONTH_HELP),
minimum = 1,
maximum = 12,
step = 1,
default = 1,
day varid = Date.Day, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from
prompt = STRING_TOKEN(STR_DATE_PROMPT),
help = STRING_TOKEN(STR_DATE_DAY_HELP),
minimum = 1,
maximum = 31,
step = 0x1,
default = 1,
enddate;
time hour varid = Time.Hours, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from
prompt = STRING_TOKEN(STR_TIME_PROMPT),
help = STRING_TOKEN(STR_TIME_HOUR_HELP),
minimum = 0,
maximum = 23,
step = 1,
default = 0,
minute varid = Time.Minutes, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from
prompt = STRING_TOKEN(STR_TIME_PROMPT),
help = STRING_TOKEN(STR_TIME_MINUTE_HELP),
minimum = 0,
maximum = 59,
step = 1,
default = 0,
second varid = Time.Seconds, // Note that it is a member of NULL, so the RTC will be the system resource to retrieve and save from
prompt = STRING_TOKEN(STR_TIME_PROMPT),
help = STRING_TOKEN(STR_TIME_SECOND_HELP),
minimum = 0,
maximum = 59,
step = 1,
default = 0,
endtime;
2007-07-02 07:52:03 +02:00
grayoutif
2007-06-29 17:14:00 +02:00
ideqval Date.Day == 21
AND
ideqval Date.Month == 8;
2007-07-02 07:52:03 +02:00
2007-06-29 17:14:00 +02:00
hidden value = 32, key = 0x7777;
endif; // grayoutif
suppressif
ideqval Date.Day == 8
AND
2007-07-02 07:52:03 +02:00
ideqval Date.Month == 21;
2007-06-29 17:14:00 +02:00
hidden value = 32, key = 0x7777;
endif; // suppressif
hidden value = 32, key = 0x1234;
inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),
ideqval MyIfrNVData.HowOldAreYouInYearsManual == 4
endif;
2007-07-02 07:52:03 +02:00
2007-06-29 17:14:00 +02:00
inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),
ideqvallist MyIfrNVData.HowOldAreYouInYearsManual == 1 2 3 4
endif;
inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),
ideqid MyIfrNVData.HowOldAreYouInYearsManual == MyIfrNVData.MyFavoriteNumber
endif;
2007-07-02 07:52:03 +02:00
// grayoutif
2007-06-29 17:14:00 +02:00
//
// If the day is 31 AND months is any of the following 2, 4, 6, 9, 11
//
inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),
2007-07-02 07:52:03 +02:00
ideqval Date.Day == 31
2007-06-29 17:14:00 +02:00
AND
ideqvallist Date.Month == 2 4 6 9 11
endif;
//
// If the day is 30 AND month is 2
//
inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),
ideqval Date.Day == 30
AND
ideqval Date.Month == 2
endif;
//
// If the day is 29 AND month is 2 AND it year is NOT a leapyear
//
inconsistentif prompt = STRING_TOKEN(STR_ERROR_POPUP),
ideqval Date.Day == 0x1D
AND
2007-07-02 07:52:03 +02:00
ideqval Date.Month == 2
2007-06-29 17:14:00 +02:00
AND
NOT
ideqvallist Date.Year == 2004 2008 20012 20016 2020 2024 2028 2032 2036
endif;
checkbox varid = MyIfrNVData.ChooseToActivateNuclearWeaponry,
prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT),
2007-07-02 07:52:03 +02:00
help = STRING_TOKEN(STR_CHECK_BOX_HELP),
2007-06-29 17:14:00 +02:00
flags = 1,
key = 0,
endcheckbox;
2007-07-02 07:52:03 +02:00
text
help = STRING_TOKEN(STR_TEXT_HELP),
2007-06-29 17:14:00 +02:00
text = STRING_TOKEN(STR_TEXT_TEXT_1);
2007-07-02 07:52:03 +02:00
text
help = STRING_TOKEN(STR_TEXT_HELP),
2007-06-29 17:14:00 +02:00
text = STRING_TOKEN(STR_TEXT_TEXT_1),
text = STRING_TOKEN(STR_TEXT_TEXT_2),
flags = 0,
key = MY_TEXT_KEY;
2007-07-02 07:52:03 +02:00
goto 1,
2007-06-29 17:14:00 +02:00
prompt = STRING_TOKEN(STR_GOTO_FORM1), //MainSetupPage // this too has no end-op and basically it's a jump to a form ONLY
help = STRING_TOKEN(STR_GOTO_HELP);
endform;
form formid = 3, title = STRING_TOKEN(STR_FORM3_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code
grayoutif ideqval MyIfrNVData.SuppressGrayOutSomething == 0x1;
2007-07-02 07:52:03 +02:00
text
help = STRING_TOKEN(STR_TEXT_HELP),
2007-06-29 17:14:00 +02:00
text = STRING_TOKEN(STR_TEXT_TEXT_1);
2007-07-02 07:52:03 +02:00
2007-06-29 17:14:00 +02:00
endif; //end grayoutif
2007-07-02 07:52:03 +02:00
text
help = STRING_TOKEN(STR_TEXT_HELP),
2007-06-29 17:14:00 +02:00
text = STRING_TOKEN(STR_TEXT_TEXT_1);
2007-07-02 07:52:03 +02:00
2007-06-29 17:14:00 +02:00
endform;
2007-07-02 07:52:03 +02:00
2007-06-29 17:14:00 +02:00
form formid = 4, title = STRING_TOKEN(STR_FORM3_TITLE);
endform;
2007-07-02 07:52:03 +02:00
form formid = 0x1234, // Dynamically created page,
2007-06-29 17:14:00 +02:00
title = STRING_TOKEN(STR_DYNAMIC_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code
label 0x1234;
endform;
endformset;