Multiple BindMessage(In|Out)Port() of the same port

From: Bojsen, Per <bojsen@zaiqtech.com>
Date: Tue May 18 2004 - 07:46:00 PDT

Hi,

the SCE-MI standard does not say whether it is allowed or not
to call BindMessage(In|Out)Port() on the same port. We can
go several ways on this:

  1) Disallow it and flag an error on the second and subsequent
     attempt to bind the port.

  2) Flag an error on the second and subsequent attempt to bind
     the port, but return a pointer to the previously constructed
     port proxy object.

  3) Allow it and return a pointer to the previously constructed
     port proxy object.

  4) Allow it and return a pointer to a new port proxy object,
     in effect allowing multiple port proxy objects to refer to
     the same port.

  5) Allow it, but leave it up to the implementation to choose
     whether to implement (3) or (4).

Personally, I can see how (2) or (3) could be useful especially
when putting together testbenches with components from different
sources. The difference between (2) and (3) is that three
allows the caller to tell if the message port has already been
bound by somebody else. The caller would pass a non-NULL
SceMiEC structure and check the structure upon return. If the
call returned a non-NULL value and the SceMiEC indicates
an error, then the caller knows the port was already bound yet
the caller also obtained the pointer to the proxy.

Per
Received on Tue May 18 07:46:05 2004

This archive was generated by hypermail 2.1.8 : Tue May 18 2004 - 07:46:19 PDT