Is there any way to change the value of a variable of another process withoutusing any interrupts? Since there is an op_ima_obj_svar_get (), I think that there should be an op_ima_obj_svar_set.

Categories:
Solution Number:
S20721
Last Modified:
2013-08-20
Issue

Is there any way to change the value of a variable of another process withoutusing any interrupts? Since there is an op_ima_obj_svar_get (), I think that there should be an op_ima_obj_svar_set.

Solution

Note that 'op_ima_obj_svar_get () is an alternative form of inter-process communication. By remotely accessing state variables (or pointer to a state variable, to be more precise), you should be able to access as well as set the values.For example:In process model A (which gets state variable declared in process model B): /* Access process B's state variable */proc_b_svar_ptr = (int *) op_ima_obj_svar_get (proc_B_mod_objid, my_state_variable);/* Modify the state variable just accessed from process B */*proc_b_svar_ptr = 822001Now if you need to interrupt process B to let it know that its statevariable value is changed and that it should proceed with furtherprocessing, you can schedule an interrupt for process B using manydifferent ways, including:1. Remote interrupt the module surrounding process model B: useop_intrpt_schedule_remote (proc_B_mod_objid, ...)2. Process interrupt the process model B: use op_intrpt_schedule_process(process_B_pro_handle, ...)

Environment

DES Kernel->Process Modeling/Coding

Attachments
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Can't find an answer? Create a case