How to send Gentypes
     
  • General Idea

  •  
           Gentypes can be generally characterized as a number of Attribute-Value-Pair's.  Since the number of Gentypes vary from primitive to primitive, we propose to send one pair at a time.  In order to achieve this, the server and the client need a series of data transfers, starting with a message telling the receiving side the number of pairs to be sent.  When the receiving side gets the number, it will send a reply to the sending side to request for an Attribute-Value-Pair with a sequence number.  The sequence number tells the sending side which of the Attribute-Value-Pair in its list to send.  When all the pairs are received, the receiving side notifies the sending side by a message with sequence number -1.
     
  • CPAM specific
  •       For primitives Invoke and SetParameter, the client has to send an Attribute-Value-Pair list to the server. The following protocol is used.  The client first sends the InvokeMsg message or SetParamMsg message, which includes a field, called numParameters. The server respond with a corresponding reply message. The reply message has a field called sequence, which ranges from 0 to numParameters-1. The sequence number is
    used to prompt the client to send that particular attribute-value-pair.  Upon receiving the sequence number, the client sends out a GenTypeRequest message, which includes fields for Name of the parameter and the Value of the parameter. Upon receiving this GenTypeRequest message, server then asks for another attribute-value-pair by sending another reply message with a different sequence. This protocol goes back and forth until server sends a reply message with sequence -1, which signifies that all pairs
    have been requested.

            For primitives Estimate, GetParameter, and Extract, the client has to send a Parameter List to the server, and the server has to reply with an Attribute-Value-Pair List. First the client sends the Estimate or GetParameter, or Extract message which includes a field called, numNames. The server then request a particular name by sending a reply (EstGetpExtrRpy) with a sequence number. For the first request (sequence
    number=0), skip the last two fields (value and valuesize).  Upon receiving the reply, the client sends out the parameter name corresponding to that sequence number, using the NameRequest message. Upon receiving the that parameter name, the server then sends out the attribute-value-pair for that parameter name, which is
    piggy-backed (using valuesize and value fields) to a reply message which asks for the next parameter name. This continues until server sends out the reply with the attribute-value-pair and sequence number -1.