The following code snippet demonstrates how to statically define a JAUS ID to IP address mapping.



transport::AddressMap& addressMap = transport::AddressMap::instance();

transport::Address jausAddress(1, 1, 1);
transport::AS5669::JudpAddress judpAddress(system::InetAddress::getByName("192.168.0.3"), 3794, transport::EXTERNAL);
addressMap.setTransportData(jausAddress, judpAddress);


Notes:

  • The address map instance is a Singleton.
  • If the destination component supports the use of a port other than the JAUS port (3794), that port number can used instead. 
    • If it is unknown if the component supports the use of a secondary port use port 3794.
  • If a message comes in with a source address equal to the one specified, the address mapping will be overwritten.