/* File Name: msg.format */ /* message format used for "FAKE" EXTERNAL input messages from outside */ /* So this is just used for the testing of your active index system */ /* Note all messages sent or received among ICs are all INTERNAL messages, while messages sent from outside to ICs are EXTERNAL messages. All output messages specified in fg format belong to INTERNAL messages. */ msg_flag (integer) // message flag: either IC_type or IC_ID msg_type (integer) // message type itype (char string) // ic type of receiver sender (integer) // for external message, sender=-1 #receivers (integer) receiver1 receiver2 ... receiver_#receivers (integers) // ic id's content (char string) // message content or parameters msg_flag (integer) msg_type (integer) itype (char string) sender (integer) #receivers (integer) receiver1 receiver2 ... receiver_#receivers (integers) content (char string) . . . mflag = IC_TYPE means that this message will be sent to a new ic of the type you specify, while mflag = IC_ID means that this message will sent to existing ic(s) you specify. Note: If mflag is IC_TYPE, the receiver's ic_id will be ignored by the IC_Manager, since the IC_Manager will get an id for the new IC. If mflag is IC_ID, the receiver's ic_type will be ignored by the IC_Manager, since the IC_Manager will send the message to ic's with the specified id's. If mflag is IC_ID, it is highly recommended to design the receiver to have a known id. Do NOT try to use find_ic() or all_ic() to decide the receivers of the "external" message in function create_msg() at run time unless you are familiar with the ic_manager. Example: 2 // IC_TYPE, which means this message sends to new IC(s). 1 // message type 1 HIC // ic type of receiver -1 // EXTERNAL 1 // 1 receiver (i.e. output ic) 0 // this field will be ignored. content_of_mag1 // content or parameters 1 // IC_ID, which means this message sends to existing IC(s). 1 // message type 1 DIC // ic type of receiver (this field will be ignored) 1 // sender ic id 1 2 // 2 receivers (2 output ics) 2 3 // receivers' ic_id's are 2 and 3 content_of_mag2 // content or parameters