[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about event uid



> In event.cc, event->uid is initialised to 0 in the constructor. In
> schedule() in schedule.cc, event->uid is only assigned provided event->uid
> <=0 when it is passed into schedule(); otherwise, the error message "Event
> UID not valid" appears.

An event's ID is assigned a value in schedule(), then it's assigned to
negative when it's scheduled. If you look about 20 lines down from
schedule(), you'll see dispatch() that's where it becomes negative.

- Haobo

> I got "Event UID not valid" in my simulation, so I wonder how did event UID
> become >0 between instantiating the event and entering schedule()?
> 
> 
> ---- Original Message -----
> From: Haobo Yu <[email protected]>
> To: Tan H P <[email protected]>
> Cc: <[email protected]>
> Sent: Saturday, February 05, 2000 3:07 PM
> Subject: Re: Question about event uid
> 
> 
> > Is it in Scheduler::schedule() in scheduler.cc?
> >
> > On Sat, 5 Feb 2000, Tan H P wrote:
> >
> > > Hi all,
> > >
> > > I have a question concerning event->uid. When you have a statement
> schedule(&hRes, &intr, txt), where intr is an Event object, how and when is
> its uid assigned?
> > >
> > > Thanks
> > > HP Tan
> > >
> >
> 
>