package org.josast.amicalsat;

import org.josast.amicalsat.FrameTlmAmicalsat.U2RlType;
import org.josast.amicalsat.FrameTlmAmicalsat.U2Type;

//#[U2];RL;[Timestamp],[CPU voltage];[Battery voltage];[CPU temperature];[Amplifier temperature];[Flags]

public class U2RlTypeFrame extends Frame {

	private String timeStamps;
	private String batteryVoltage;
	private String amplifierTemperature;
	private int flags;

	@Override
	public void setUp(FrameTlmAmicalsat cube) {

		U2Type u2type = (U2Type) cube.frameTlmEntrySat().payload().tlmAreaSwitch();
		U2RlType mstype = (U2RlType) u2type.tlmsw();
		
		timeStamps = mstype.timeStamp();
		hash.put("timeStamps", timeStamps);
		
		String cpuVoltage = mstype.cpuVoltage();
		hash.put("cpuVoltage", cpuVoltage);
		batteryVoltage = mstype.batteryVoltage();
		hash.put("batteryVoltage", batteryVoltage);
		amplifierTemperature = mstype.amplifierTemperature();
		hash.put("amplifierTemperature", amplifierTemperature);
		
		flags = mstype.flags();
		hash.put("flags", ""+flags	);	
		
	

		
	}


}
