Azzera filtri
Azzera filtri

Events Listening, Callback functions

3 visualizzazioni (ultimi 30 giorni)
Bolivar
Bolivar il 11 Ago 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 Commenti
Jan
Jan il 12 Ago 2013
What are "objects" in your case?
Bolivar
Bolivar il 12 Ago 2013
Modificato: Bolivar il 12 Ago 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

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Programming Utilities in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by