package org.josast.amicalsat;

import java.util.Hashtable;

public abstract class Frame {
    protected FrameTlmAmicalsat data =null;
	protected Hashtable<String, String> hash = new Hashtable<String, String>();
	protected Hashtable<String, String> hashHeader = new Hashtable<String, String>();
	
	
	public  void setUp(FrameTlmAmicalsat fm)
	{
		data = fm;
		setUpFrame();
	}

	protected abstract void  setUpFrame ();
	
    public String toStringHeader() {
    	hashHeader.put("Source", data.frameTlmEntrySat().ax25Header().srcCallsignRaw().srcCallsignRor().srcCallsign());
    	hashHeader.put("Destination",data.frameTlmEntrySat().ax25Header().destCallsignRaw().destCallsignRor().destCallsign());
    	hashHeader.put("PID",""+data.frameTlmEntrySat().payload().pid());
       	hashHeader.put("SSID",""+data.frameTlmEntrySat().ax25Header().srcSsidRaw());
		return hashHeader.toString();

    }
	@Override
    public String toString() {
		return hash.toString();

    }

}
