Search in sources :

Example 1 with ProfileLTE

use of com.att.aro.core.configuration.pojo.ProfileLTE in project VideoOptimzer by attdevsupport.

the class ProfileFactoryImpl method createLTE.

@Override
public Profile createLTE(Properties properties) {
    ProfileLTE prof = new ProfileLTE();
    this.createBaseData(prof, properties);
    prof.setDevice(readString(properties, ProfileLTE.DEVICE, "Default LTE Device"));
    prof.setPromotionTime(readDouble(properties, ProfileLTE.T_PROMOTION, 0.26));
    prof.setInactivityTimer(readDouble(properties, ProfileLTE.INACTIVITY_TIMER, 0.1));
    prof.setDrxShortTime(readDouble(properties, ProfileLTE.T_SHORT_DRX, 0.02));
    prof.setDrxPingTime(readDouble(properties, ProfileLTE.T_DRX_PING, 0.002));
    prof.setDrxLongTime(readDouble(properties, ProfileLTE.T_LONG_DRX, 10));
    prof.setIdlePingTime(readDouble(properties, ProfileLTE.T_IDLE_PING, 0.043));
    prof.setDrxShortPingPeriod(readDouble(properties, ProfileLTE.T_SHORT_DRX_PING_PERIOD, 0.02));
    prof.setDrxLongPingPeriod(readDouble(properties, ProfileLTE.T_LONG_DRX_PING_PERIOD, 0.04));
    prof.setIdlePingPeriod(readDouble(properties, ProfileLTE.T_IDLE_PING_PERIOD, 1.28));
    prof.setLtePromotionPower(readDouble(properties, ProfileLTE.P_PROMOTION, 1.21));
    prof.setDrxShortPingPower(readDouble(properties, ProfileLTE.P_SHORT_DRX_PING, 1.68));
    prof.setDrxLongPingPower(readDouble(properties, ProfileLTE.P_LONG_DRX_PING, 1.68));
    prof.setLteTailPower(readDouble(properties, ProfileLTE.P_TAIL, 1.06));
    prof.setLteIdlePingPower(readDouble(properties, ProfileLTE.P_IDLE_PING, 0.594));
    prof.setLteIdlePower(readDouble(properties, ProfileLTE.P_IDLE, 0.0));
    prof.setLteAlphaUp(readDouble(properties, ProfileLTE.LTE_ALPHA_UP, 438.39));
    prof.setLteAlphaDown(readDouble(properties, ProfileLTE.LTE_ALPHA_DOWN, 51.97));
    prof.setLteBeta(readDouble(properties, ProfileLTE.LTE_BETA, 1.2));
    return prof;
}
Also used : ProfileLTE(com.att.aro.core.configuration.pojo.ProfileLTE)

Example 2 with ProfileLTE

use of com.att.aro.core.configuration.pojo.ProfileLTE in project VideoOptimzer by attdevsupport.

the class RrcStateRangeFactoryImplTest method create_LTEIsIdle.

@Test
public void create_LTEIsIdle() {
    ProfileLTE profile02 = mock(ProfileLTE.class);
    when(profile02.getProfileType()).thenReturn(ProfileType.LTE);
    List<PacketInfo> packetlist1 = new ArrayList<PacketInfo>();
    double traceDuration = 2000.0;
    List<RrcStateRange> testResult = rrcStateRangeFactory.create(packetlist1, profile02, traceDuration);
    assertEquals(1, testResult.size());
}
Also used : ArrayList(java.util.ArrayList) PacketInfo(com.att.aro.core.packetanalysis.pojo.PacketInfo) RrcStateRange(com.att.aro.core.packetanalysis.pojo.RrcStateRange) ProfileLTE(com.att.aro.core.configuration.pojo.ProfileLTE) Test(org.junit.Test) BaseTest(com.att.aro.core.BaseTest)

Example 3 with ProfileLTE

use of com.att.aro.core.configuration.pojo.ProfileLTE in project VideoOptimzer by attdevsupport.

the class RrcStateMachineFactoryImplTest method create_LTEStateIsLTE_IDLE.

@Test
public void create_LTEStateIsLTE_IDLE() {
    ProfileLTE profile03 = mock(ProfileLTE.class);
    when(profile03.getProfileType()).thenReturn(ProfileType.LTE);
    when(profilefactory.energyLTE(any(double.class), any(double.class), any(RRCState.class), any(ProfileLTE.class), any(ArrayList.class))).thenReturn(100.0);
    List<PacketInfo> packetlist1 = new ArrayList<PacketInfo>();
    List<RrcStateRange> staterangelist = new ArrayList<RrcStateRange>();
    RrcStateRange[] rrcStateRangeArray = new RrcStateRange[5];
    for (int i = 0; i < 5; i++) {
        rrcStateRangeArray[i] = mock(RrcStateRange.class);
        when(rrcStateRangeArray[i].getState()).thenReturn(RRCState.LTE_IDLE);
        when(rrcStateRangeArray[i].getBeginTime()).thenReturn((double) date.getTime() + 2 * i * 1000);
        when(rrcStateRangeArray[i].getEndTime()).thenReturn((double) date.getTime() + (2 * i + 1) * 1000.0);
    }
    for (int i = 0; i < 5; i++) {
        staterangelist.add(rrcStateRangeArray[i]);
    }
    when(staterange.create(any(ArrayList.class), any(Profile.class), any(double.class))).thenReturn(staterangelist);
    RrcStateMachineLTE rrcStateMachineLTE = (RrcStateMachineLTE) machineFactoryimpl.create(packetlist1, profile03, packetDuration, traceDuration, totalBytes * 100, null);
    assertEquals(50, rrcStateMachineLTE.getJoulesPerKilobyte(), 0.0);
    assertEquals(500, rrcStateMachineLTE.getTotalRRCEnergy(), 0.0);
    assertEquals(5000, rrcStateMachineLTE.getLteIdleTime(), 0.0);
}
Also used : RrcStateMachineLTE(com.att.aro.core.packetanalysis.pojo.RrcStateMachineLTE) RRCState(com.att.aro.core.packetanalysis.pojo.RRCState) ArrayList(java.util.ArrayList) PacketInfo(com.att.aro.core.packetanalysis.pojo.PacketInfo) RrcStateRange(com.att.aro.core.packetanalysis.pojo.RrcStateRange) ProfileLTE(com.att.aro.core.configuration.pojo.ProfileLTE) Profile(com.att.aro.core.configuration.pojo.Profile) BaseTest(com.att.aro.core.BaseTest) Test(org.junit.Test)

Example 4 with ProfileLTE

use of com.att.aro.core.configuration.pojo.ProfileLTE in project VideoOptimzer by attdevsupport.

the class RrcStateMachineFactoryImplTest method create_LTEStateIsLTE_DRX_LONG.

@Test
public void create_LTEStateIsLTE_DRX_LONG() {
    ProfileLTE profile08 = mock(ProfileLTE.class);
    when(profile08.getProfileType()).thenReturn(ProfileType.LTE);
    when(profilefactory.energyLTE(any(double.class), any(double.class), any(RRCState.class), any(ProfileLTE.class), any(ArrayList.class))).thenReturn(6.0);
    List<PacketInfo> packetlist1 = new ArrayList<PacketInfo>();
    List<RrcStateRange> staterangelist = new ArrayList<RrcStateRange>();
    RrcStateRange[] rrcStateRangeArray = new RrcStateRange[5];
    for (int i = 0; i < 5; i++) {
        rrcStateRangeArray[i] = mock(RrcStateRange.class);
        when(rrcStateRangeArray[i].getState()).thenReturn(RRCState.LTE_DRX_LONG);
        when(rrcStateRangeArray[i].getBeginTime()).thenReturn((double) date.getTime() + 2 * i * 500);
        when(rrcStateRangeArray[i].getEndTime()).thenReturn((double) date.getTime() + (2 * i + 1) * 500.0);
    }
    for (int i = 0; i < 5; i++) {
        staterangelist.add(rrcStateRangeArray[i]);
    }
    when(staterange.create(any(ArrayList.class), any(Profile.class), any(double.class))).thenReturn(staterangelist);
    RrcStateMachineLTE rrcStateMachineLTE = (RrcStateMachineLTE) machineFactoryimpl.create(packetlist1, profile08, packetDuration, traceDuration, totalBytes * 125, null);
    assertEquals(2.4, rrcStateMachineLTE.getJoulesPerKilobyte(), 0.0);
    assertEquals(2500, rrcStateMachineLTE.getLteDrxLongTime(), 0.0);
    assertEquals(30, rrcStateMachineLTE.getLteDrxLongEnergy(), 0.0);
}
Also used : RrcStateMachineLTE(com.att.aro.core.packetanalysis.pojo.RrcStateMachineLTE) RRCState(com.att.aro.core.packetanalysis.pojo.RRCState) ArrayList(java.util.ArrayList) PacketInfo(com.att.aro.core.packetanalysis.pojo.PacketInfo) RrcStateRange(com.att.aro.core.packetanalysis.pojo.RrcStateRange) ProfileLTE(com.att.aro.core.configuration.pojo.ProfileLTE) Profile(com.att.aro.core.configuration.pojo.Profile) BaseTest(com.att.aro.core.BaseTest) Test(org.junit.Test)

Example 5 with ProfileLTE

use of com.att.aro.core.configuration.pojo.ProfileLTE in project VideoOptimzer by attdevsupport.

the class RrcStateMachineFactoryImplTest method create_LTEStateIsLTE_PROMOTION.

@Test
public void create_LTEStateIsLTE_PROMOTION() {
    ProfileLTE profile04 = mock(ProfileLTE.class);
    when(profile04.getProfileType()).thenReturn(ProfileType.LTE);
    when(profilefactory.energyLTE(any(double.class), any(double.class), any(RRCState.class), any(ProfileLTE.class), any(ArrayList.class))).thenReturn(5.0);
    List<PacketInfo> packetlist1 = new ArrayList<PacketInfo>();
    List<RrcStateRange> staterangelist = new ArrayList<RrcStateRange>();
    RrcStateRange[] rrcStateRangeArray = new RrcStateRange[5];
    for (int i = 0; i < 5; i++) {
        rrcStateRangeArray[i] = mock(RrcStateRange.class);
        when(rrcStateRangeArray[i].getState()).thenReturn(RRCState.LTE_PROMOTION);
        when(rrcStateRangeArray[i].getBeginTime()).thenReturn((double) date.getTime() + 2 * i * 1000);
        when(rrcStateRangeArray[i].getEndTime()).thenReturn((double) date.getTime() + (2 * i + 1) * 2000.0);
    }
    for (int i = 0; i < 5; i++) {
        staterangelist.add(rrcStateRangeArray[i]);
    }
    when(staterange.create(any(ArrayList.class), any(Profile.class), any(double.class))).thenReturn(staterangelist);
    RrcStateMachineLTE rrcStateMachineLTE = (RrcStateMachineLTE) machineFactoryimpl.create(packetlist1, profile04, packetDuration, traceDuration, totalBytes * 1000, null);
    assertEquals(0.25, rrcStateMachineLTE.getJoulesPerKilobyte(), 0.0);
    assertEquals(25, rrcStateMachineLTE.getLteIdleToCRPromotionEnergy(), 0.0);
    assertEquals(30000, rrcStateMachineLTE.getLteIdleToCRPromotionTime(), 0.0);
}
Also used : RrcStateMachineLTE(com.att.aro.core.packetanalysis.pojo.RrcStateMachineLTE) RRCState(com.att.aro.core.packetanalysis.pojo.RRCState) ArrayList(java.util.ArrayList) PacketInfo(com.att.aro.core.packetanalysis.pojo.PacketInfo) RrcStateRange(com.att.aro.core.packetanalysis.pojo.RrcStateRange) ProfileLTE(com.att.aro.core.configuration.pojo.ProfileLTE) Profile(com.att.aro.core.configuration.pojo.Profile) BaseTest(com.att.aro.core.BaseTest) Test(org.junit.Test)

Aggregations

ProfileLTE (com.att.aro.core.configuration.pojo.ProfileLTE)25 BaseTest (com.att.aro.core.BaseTest)22 Test (org.junit.Test)22 PacketInfo (com.att.aro.core.packetanalysis.pojo.PacketInfo)18 ArrayList (java.util.ArrayList)18 RrcStateRange (com.att.aro.core.packetanalysis.pojo.RrcStateRange)12 Profile (com.att.aro.core.configuration.pojo.Profile)10 RrcStateMachineLTE (com.att.aro.core.packetanalysis.pojo.RrcStateMachineLTE)8 RRCState (com.att.aro.core.packetanalysis.pojo.RRCState)7 BurstCollectionAnalysisData (com.att.aro.core.packetanalysis.pojo.BurstCollectionAnalysisData)3 PacketAnalyzerResult (com.att.aro.core.packetanalysis.pojo.PacketAnalyzerResult)3 CpuActivity (com.att.aro.core.peripheral.pojo.CpuActivity)3 InetAddress (java.net.InetAddress)3 AnalysisFilter (com.att.aro.core.packetanalysis.pojo.AnalysisFilter)2 Session (com.att.aro.core.packetanalysis.pojo.Session)2 DomainNameSystem (com.att.aro.core.packetreader.pojo.DomainNameSystem)2 TCPPacket (com.att.aro.core.packetreader.pojo.TCPPacket)2 UDPPacket (com.att.aro.core.packetreader.pojo.UDPPacket)2 CpuActivityList (com.att.aro.core.peripheral.pojo.CpuActivityList)2 HashSet (java.util.HashSet)2