필터 지우기
필터 지우기

Events Listening, Callback functions

조회 수: 3 (최근 30일)
Bolivar
Bolivar 2013년 8월 11일
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
Jan
Jan 2013년 8월 12일
What are "objects" in your case?
Bolivar
Bolivar 2013년 8월 12일
편집: Bolivar 2013년 8월 12일
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

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming Utilities에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by