next up previous contents
Next: sig_info Class Instantiation Up: The sig_info Class Previous: sig_info Class Variables

sig_info Class Methods

Method Description
T &reader() This function returns a reference to the reader value of the signal.
sig_info(name_stack &iname,
        map_list *mlist,
        type_info_interface *type,
        char direction,
        resolver_base *res)
Constructor to instantiate a port signal. ``iname'' is the instance name of the signal, ``mlist'' a pointer to a list storing mapping information, type a pointer to a type information object, ``direction'' is of vIN, vOUT, vINOUT, vBUFFER, vLINKAGE, and ``res'' a pointer to a resolver handler or NULL if the signal is not associated with a resolver function.
sig_info(stack_name &iname,
        type_info *type,
        int sigtype,
        resolver_base *res)
Constructor to instantiate a standard (explicit) signal. For the meaning of the parameter ``iname'' and ``res'' see above. ``sigtype'' is either of vREGISTER or vBUS.
sig_info(name_stack &iname,
        type_info_interface *type,
        char attr,
        sig_info_base *base_sig,
        acl *aclp,
        time delay)
Constructor to instantiate a implicit signal kind attribute. For the meaning of ``iname'' and ``type'' see above. ``attr'' is a enumeration parameter to pass the attribute kind to the constructor (vDELAYED, vTRANSACTION, vSTABLE, vQUIET), ``base_sig'' the prefix signal of the signal kind attribute, and ``aclp'' describes which part of the signal prefix is affected. ``delay'' is an optional time parameter for the vDELAYED attribute.
sig_info(name_stack &iname) Constructor to instantiate a GUARD signal. ``iname'' is the instance name of the signal.
void init_reader(const void *src) Inits the reader of the signal with the value ``src'' points to. Actually, this method is the backend of the ``init'' methods defined in the derived classes. ``init'' does only initialise the reader if the signal has no parent signal (i.e. is not associated with an actual).
   

reader() is used to cast the reader_value variable of the base class to the type of the signal. It is called by the automatically generated code to access the current value of a signal. The method is defined as follows:

template<class T>
  /* Casts the reader pointer to the corresponding type */
  T &reader() { return *(T*)pointer; }

  /* Constructor to instantiate a port signal */
  sig_info(name_stack &iname, map_list *mlist,
	   type_info_interface *type, char direction,
	   resolver_base *res) : 
    sig_info_base(iname, mlist, type, direction, res) {};
  ...

  /* Inits the reader of the signal */
  void init(const T &value) { init_reader(&value); }
}

The list ``mlist'' points to contains all mapping information of actual to formal signals of the current component. Based on this information the constructor establishes the links between the current signal and its parent(s).


next up previous contents
Next: sig_info Class Instantiation Up: The sig_info Class Previous: sig_info Class Variables

1998-11-17