Events Listening, Callback functions

1 visualización (últimos 30 días)
Bolivar
Bolivar el 11 de Ag. de 2013
Hi, for my project I've got objects which should have thier listener callback function executed a certain among of times (up to 12 times) befor performing any other computations.
Can someone give me any guidance how to achieve this??
thanks,
Bolivar
  2 comentarios
Jan
Jan el 12 de Ag. de 2013
What are "objects" in your case?
Bolivar
Bolivar el 12 de Ag. de 2013
Editada: Bolivar el 12 de Ag. de 2013
Hi simon,
my objects can be defined as following:
classdef object < handle
properties
Link[10] % array obj objects link
end
methods
function obj = objects(objx) %objx is array of objects of type objects1
if nargin ~=0
addlistener(objx,'BS_CH_CONFIRM',@callbackconfirm);
addlistener(objx,'BS_CHANNEL_REQUEST';@callbackrequest);
end
end
........
end
now Assume we have six instance of class objects listening to each other. obj(6) = object; and obj(1) = objects([obj2-6]),obj(2)=objects([obj1,3-6]),obj(3) = objects([obj1,2,4-6]) and so on. When obj(1) echo if noone is been using link(2). all the other should reply depending on thier status, either immediately if themself currently haven't initiate a request or postpone if they do. the Reply appends information about status of their using links properties (link(2) in our case). Just after thier reply can obj(1) check for which property it should ask again. then they should use dictinct link properties' object. Now how do I know if all the other have reply? or set any timeout for reply notification.
thanks

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Software Development Tools en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by