src/AgentManager/fipa/ACLMessage.js
/**
 * Returns a reply for the given message, filling-in the as much fields as possible.
 *
 * @param {ACLMessage} msg Received ACLMessage object.
 * @param {number} performative Performative to use in the reply.
 * @param {AID} sender Sender of the reply.
 * @returns {ACLMessage} ACLMessage object representing the reply.
 */
Returns a reply for the given message, filling-in the as much fields as possible.
Returns a reply for the given message filling - in the as much fields as possible .
function ACLMakeReply(msg, performative, sender) {
    var reply = new ACLMessage(performative);
    reply.sender = sender;
    if (!msg.replyTo)
        reply.receivers.push(msg.replyTo);
    else if (!msg.sender)
        reply.receivers.push(msg.sender);
    if (!msg.language)
        reply.language = msg.language;
    if (!msg.ontology)
        reply.ontology = msg.ontology;
    if (!msg.encoding)
        reply.encoding = msg.encoding;
    if (!msg.protocol)
        reply.protocol = msg.protocol;
    if (!msg.conversationId)
        reply.conversationId = msg.conversationId;
    if (!msg.replyWith)
        reply.inReplyTo = msg.replyWith;
    return reply;
}
function ACLMakeReply ( msg , performative , sender ) { var reply = new ACLMessage ( performative ) ; reply . sender = sender ; if ( ! msg . replyTo ) reply . receivers . push ( msg . replyTo ) ; else if ( ! msg . sender ) reply . receivers . push ( msg . sender ) ; if ( ! msg . language ) reply . language = msg . language ; if ( ! msg . ontology ) reply . ontology = msg . ontology ; if ( ! msg . encoding ) reply . encoding = msg . encoding ; if ( ! msg . protocol ) reply . protocol = msg . protocol ; if ( ! msg . conversationId ) reply . conversationId = msg . conversationId ; if ( ! msg . replyWith ) reply . inReplyTo = msg . replyWith ; return reply ; }
Returns a reply for the given message, filling-in the as much fields as possible.
Returns a reply for the given message filling - in the as much fields as possible .