Skip To Content

Processing military messages

In this topic

About military messages

Situation Awarenes and Command and Control systems need to pass secure military communications between 'in the field' mobile devices and command centers. These military messages indicate where specific military features are located on the ground. Using this API you can build an application to convert these military messages into military symbols and displayed them at specific locations on a map.

Messages are transmitted from radio devices according to military standards. This release supports military standards such as MIL-STD-2525C. The SDK provides a symbol dictionary that delivers the appropriate symbology for that message.

Displaying military messages using message processing

To display a message on a map simply pass the message to a message processor. This message processor will handle all the graphic creation and display tasks. Before creating the message processor you need to do 2 things:

  • Firstly, access the symbol dictionary. You can either add the symbol dictionary directly to you Xcode project or access the symbol dictionary in the applications shared folder. There are advantages and disadvantages to both options that you should explore in this document called Using and Deploying the Symbol Dictionary .
  • Secondly, create a group layer to display the message symbols. Create this group layer and add it to the map view.

Next create a message processor (AGSMessageProcessor) and pass the symbol dictionary type. For example, if your messages conform to the MIL-STD-2525C standard, then choose AGSMPSymbolDictionaryTypeMil2525C. Secondly, provide the group layer to display the message symbols.

All you need to do is pass the message to the message processor. The message processor will interpret the message attributes and update a graphics layer in the group layer with the correct symbol and location. The message attribute _Action will determine whether a symbol is updated (including added) or removed.

How to process messages

You can process military messages by following these steps:

  1. Add the Symbol Dictionary to your application.

    To include the symbol dictionary in your application, you need to add the symbol dictionary folder to your application's Xcode project . The symbol dictionary will be found under the ${HOME}/Library/SDKs/ArcGIS/iOS/ArcGIS.framework/Versions/Current/Resources/Symbols/xxx folder (where xxx is the military standard, such as mil2525c). When you build your application, Xcode will copy the folder to the application bundle. Please explore the options for deploying the symbol dictionary in this document called Using and Deploying the Symbol Dictionary.

  2. Create the group layer to be used by the message processor.

    A group layer is a collection of layers of any type. It extends from the Layer class hence it has properties such as visibility, opacity, extent etc. The message processor will automatically add graphics layers to the group layer to display the message symbols. Message processing will not work unless the group layer has been added to an initialized map.

    //Create a Group Layer
    AGSGroupLayer *myGroupLayer = [[AGSGroupLayer alloc] init];
        
    //Add the Group Layer to the MapView
    [self.mapView addMapLayer:myGroupLayer withName:@"MP Group Layer"];
  3. Create the message processor.

    Create and initialize an AGSMPMessageProcessor. Provide the constructor with the symbol dictionary type, that matches the messages to be processed, and the group layer as created above.

    The message processor will automatically locate the symbol dictionary inside the application's bundle file. If you wish to supply a hard-coded location for the symbol dictionary then use overload of the initWithSymbolDictionaryType:groupLayer:symbolDictionaryPath.

    //Create a message processor
    //Pass the symbol dictionary type and the group layer in the Constructor
    AGSMPMessageProcessor *myMessageProcessor;
    myMessageProcessor = [[AGSMPMessageProcessor alloc] 
     initWithSymbolDictionaryType:AGSMPSymbolDictionaryTypeMil2525C 
     groupLayer:myGroupLayer];
  4. Create and populate the message.

    Create and initialize an AGSMPMessage.

    You can use messages provided by an external device or file or populate your own message with the messageID and the name-value pairs required by the message processor symbol dictionary type. Or you can explicitly set the message properties as shown below.

    By default the message spatial reference is expected to be the same a the message processor. If it is not then explicitly state the message's spatial reference using the message's _WKID value.

    AGSMPMessage* myMessage = [[AGSMPMessage alloc] init];
    
    myMessage.messageId = @"ABC123";
    [myMessage setProperty:@"position_report" forKey:@"_Type"];
    [myMessage setProperty:@"add" forKey:@"_Action"];
    [myMessage setProperty:@"7843536.41455,4088224.16202" forKey:@"_Control_Points"];
    [myMessage setProperty:@"GFGPOPP-------X" forKey:@"SIC"];
    [myMessage setProperty:@"1" forKey:@"UniqueDesignation"];
  5. Process the message.

    Call the AGSMPMessageProcessor:processMessage passing in the message. The message processor will use the _Action value to determine whether the symbol is updated or removed.

    [myMessageProcessor processMessage:myMessage]
    The _Action value of update is also used to add brand new messages to the map.