public int getLengthPrefix() {
    // Message ID
    int length = 1;
    // Number of rules
    length += 4;
    if (this.rules != null) {
      for (SubscriptionRequestRule rule : this.rules) {
        // Physical Layer
        ++length;
        // Transmitters
        length += 4 + rule.getNumTransmitters()
            * Transmitter.TRANSMITTER_ID_SIZE * 2;
        // Update interval
        length += 8;
      }

    }

    return length;
  }
public int getLengthPrefix ( ) { int length = 1 ; length += 4 ; if ( this . rules != null ) { for ( SubscriptionRequestRule rule : this . rules ) { ++ length ; length += 4 + rule . getNumTransmitters ( ) * Transmitter . TRANSMITTER_ID_SIZE * 2 ; length += 8 ; } } return length ; }
Returns the length prefix value for this message, as encoded according to
the Solver-Aggregator protocol.

@return the length prefix for this message.