package org.etsi.its.uppertester;

/**
 * This interface provides methods to support GeoNetworking upper tester
 */
public interface IGnUpperTester extends IUpperTester {
    
    /**
     * Causes SUT to generate a GeoUnicast message
     * @param   gnAddress   Destination GN address
     * @param   lifetime    Packet lifetime
     * @param   payload     Packet payload
     * @return  True if operation is successful, false otherwise
     */
    public boolean generateGeoUnicast(byte[] gnAddress, short lifetime, byte [] payload);
    
    /**
     * Causes SUT to generate a GeoBroadcast message
     * @param   shape       Destination area shape
     * @param   latitude    Destination area latitude 
     * @param   longitude   Destination area longitude
     * @param   distanceA   Destination area distance A
     * @param   distanceB   Destination area distance B
     * @param   angle       Destination area angle
     * @param   lifetime    Packet lifetime
     * @param   payload     Packet payload
     * @return  True if operation is successful, false otherwise
     */
    public boolean generateGeoBroadcast(short shape, int latitude, int longitude, short distanceA, short distanceB, short angle, short lifetime, byte[] payload);
    
    /**
     * Causes SUT to generate a GeoAnycast message
     * @param   shape       Destination area shape
     * @param   latitude    Destination area latitude 
     * @param   longitude   Destination area longitude
     * @param   distanceA   Destination area distance A
     * @param   distanceB   Destination area distance B
     * @param   angle       Destination area angle
     * @param   lifetime    Packet lifetime
     * @param   payload     Packet payload
     * @return  True if operation is successful, false otherwise
     */
    public boolean generateGeoAnycast(short shape, int latitude, int longitude, short distanceA, short distanceB, short angle, short lifetime, byte[] payload);
    
    /**
     * Causes SUT to generate a SHB message
     * @param   payload Packet payload
     * @return  True if operation is successful, false otherwise
     */
    public boolean generateShb(byte[] payload);
    
    /**
     * Causes SUT to generate a TSB message
     * @param   payload Packet payload
     * @param   nbHops  Number of hops
     * @return  True if operation is successful, false otherwise
     */
    public boolean generateTsb(byte[] payload, short nbHops);

    /**
     * Changes SUT's position
     * @return  True if operation is successful, false otherwise
     */
    public boolean changePosition();
    
    /**
     * Checks that IUT transmits specific packet to its upper layer
     * @param   packet  Sent GeoNetworking packet
     * @return  True if operation is successful, false otherwise
     */
    public boolean checkPacket(byte[] packet);

}
