Hi Team,
I have a requirement to display some measured values within a screen as single display/dual display/triple display according to the user selection. In detail the end device has 3 channels, each channel can have 3 different modules like module A, Module B, Module C and each modules have different number of modes. modules, modes, and channel combinations have defined as enums. The end device will feed the data about channels i.e. channel 1 / channel 2/ channel 3 is connected along with module name and corresponding mode. Example case scenario: Module A is connected to channel 1, and Module B is connected to channel 2. Module A has mode x, module B has mode y. the user wants to see measured values for channel 1 and channel 2 separately and then combination of channel 1 and channel 2 readings within one frame. channel combination enum has defined like CH_!, CH_2, CH_3, CH_12, CH_13, CH_23, CH_123. So now the user wants the CH_1, CH_2, CH_12 display formats. To achieve that GUI should have classes to get the channel detail along with module and mode. After that the root object will have a timer, when timer expires, the on timer will triggered to check the channel combination one by one which is selected by the user. within that function need to check corresponding module and mode and then update the values.
work flow as flows:
Under On Timer event :
if(Continos||Timed||Auto)
{
Switch(Ch_CombinationOption)
{
Case CH_1:
switch(CH[1].Module)
{
case MODULE_A:
switch(CH[1].Mode)
{
case x:
Get_UpdateMeasurePH(CHANNEL1, DISPLAY1, CH_1);
case u:
case p:
}
case MODULE_B:
switch(CH[1].Mode)
{
case y:
Get_UpdateMeasurePH(CHANNEL1, DISPLAY1, CH_1);
case v:
case q:
}
case MODULE_C:
}
case CH_2:
case CH_3:
case CH_12://Dual Channels
case CH_21:
Case CH_13://Dual Channels
switch(CH[1].Module)
{
case MODULE_A:
switch(CH[1].Mode)
{
case x:
Get_UpdateMeasurePH(CHANNEL1, DISPLAY1, CH_13);
case u:
case p:
}
case MODULE_B:
switch(CH[1].Mode)
{
case y:
Get_UpdateMeasurePH(CHANNEL1, DISPLAY1, CH_13);
case v:
case q:
}
case MODULE_C:
{
}
}
switch(CH[3].Module)
{
case MODULE_A:
switch(CH[3].Mode)
{
case x:
Get_UpdateMeasurePH(CHANNEL3, DISPLAY2, CH_13);
case u:
case p:
}
case MODULE_B:
switch(CH[3].Mode)
{
case y:
Get_UpdateMeasurePH(CHANNEL3, DISPLAY2, CH_13);
case v:
case q:
}
case MODULE_C:
{
}
}
Case CH_234://Triple
Case CH_NC:
}
Please explain the sequential implementation of the classes and functions deeply.
Regards,
Sazna.