C++ Programming
10-01-2010, 12:01 AM
I am programming a model for Process state simulation
In my model the program logic is similar to logic gates. The state of different boolean variables changes from 1 to 0 or vice versa.
Eg: The value of A, B, C and other variables changes from 0 to 1 and viceversa depending on some calculation and behaviour of the model.
There are some dependant variables X, Y, Z and other variables whose state changes accordingly the same depending on A, B and C. The dependant variables should not change immediately but with a delay that is set by the user.
My requirement is I need a function where if I call the function by passing the variable name, dependant variable name and the time delay so that the dependant variable changes according to the variable only after the set time delay. The function call should not disturb or create time delay in the model. It should only create a delay after which the dependant variable is assigned with the value.
Kindly help.
Thanks,
Mohan
In my model the program logic is similar to logic gates. The state of different boolean variables changes from 1 to 0 or vice versa.
Eg: The value of A, B, C and other variables changes from 0 to 1 and viceversa depending on some calculation and behaviour of the model.
There are some dependant variables X, Y, Z and other variables whose state changes accordingly the same depending on A, B and C. The dependant variables should not change immediately but with a delay that is set by the user.
My requirement is I need a function where if I call the function by passing the variable name, dependant variable name and the time delay so that the dependant variable changes according to the variable only after the set time delay. The function call should not disturb or create time delay in the model. It should only create a delay after which the dependant variable is assigned with the value.
Kindly help.
Thanks,
Mohan