/**
 *  Management interface for protocol layers
 *  
 *  @author     ETSI / STF424
 *  @version    $URL$
 *                $Id$
 *
 */

package org.etsi.its.adapter;

import org.etsi.its.adapter.ports.GnPort;

/**
 *  Management interface for protocol layers
 */
public interface IManagementLayers {

	/**
	 * Gets the GeoNetworking beacon header to be sent by Test Adapter for the current component
	 * @return Beacon header, or null if no Beacon shall be sent 
	 */
	public byte[] getGnBeacon();
	
	/**
	 * Registers a GN port
	 */
	public void registerGnPort(GnPort gnPort);

	/**
	 * Gets the GeoNetworking beaconing interval
	 * @return GeoNetworking beaconing interval in ms
	 */
	public int getGnBeaconInterval();

	/**
	 * Gets the GeoNetworking beacon header acting as filter for enqueueing Beacons received from neighbours
	 * @return Beacon header, or null if no Beacon shall be enqueued 
	 */
	public byte[] getGnEnqueueBeacon();
	
	/**
	 * Inserts or updates a neighbour position vector in Test Adapter internal tables
	 * @param  mid         Mid part of the neighbour's GN_Address
	 * @param  timestamp   Timestamp of the carrying message
	 * @param  lpv         Long position vector of the neighbour
	 */
	public void gnUpdateLocTable(byte[] mid, long timestamp, byte[] lpv);

	/**
     * Sets the link layer address of this component
     * param  linkLayerAddress   Link-layer address (6 bytes)
     */
    public void setLinkLayerAddress(byte[] linkLayerAddress);
	
	/**
	 * Gets the link layer address of this component
	 * @return Link-layer address (6 bytes)
	 */
	public byte[] getLinkLayerAddress();

	/**
	 * Gets the latitude of this component
	 * @return Latitude
	 */
	public byte[] getLatitude();

	/**
	 * Gets the Longitude of this component
	 * @return Longitude
	 */
	public byte[] getLongitude();
	
}
