Search in sources :

Example 1 with Supplybus

use of io.openems.impl.controller.supplybusswitch.Supplybus in project openems by OpenEMS.

the class SupplyBusTest method setUpBeforeClass.

@BeforeClass
public static void setUpBeforeClass() throws Exception {
    HashMap<Ess, WriteChannel<Boolean>> essSet = new HashMap<>();
    ess1 = new UnitTestSymmetricEssNature("ess0");
    essMap1 = new Ess(ess1);
    output1 = new UnitTestWriteChannel<>("output", "0");
    essSet.put(essMap1, output1);
    ess2 = new UnitTestSymmetricEssNature("ess1");
    essMap2 = new Ess(ess2);
    output2 = new UnitTestWriteChannel<>("output", "1");
    essSet.put(essMap2, output2);
    ess3 = new UnitTestSymmetricEssNature("ess2");
    essMap3 = new Ess(ess3);
    output3 = new UnitTestWriteChannel<>("output", "2");
    essSet.put(essMap3, output3);
    ess4 = new UnitTestSymmetricEssNature("ess3");
    essMap4 = new Ess(ess4);
    output4 = new UnitTestWriteChannel<>("output", "3");
    essSet.put(essMap4, output4);
    sbOnIndication = new UnitTestWriteChannel<>("custom", "sb1On");
    sb = new Supplybus(essSet, "sb1", essMap1, 1000L, sbOnIndication, new ArrayList<>());
}
Also used : Ess(io.openems.impl.controller.supplybusswitch.Ess) HashMap(java.util.HashMap) WriteChannel(io.openems.api.channel.WriteChannel) UnitTestWriteChannel(io.openems.test.utils.channel.UnitTestWriteChannel) ArrayList(java.util.ArrayList) UnitTestSymmetricEssNature(io.openems.test.utils.devicenatures.UnitTestSymmetricEssNature) Supplybus(io.openems.impl.controller.supplybusswitch.Supplybus) BeforeClass(org.junit.BeforeClass)

Aggregations

WriteChannel (io.openems.api.channel.WriteChannel)1 Ess (io.openems.impl.controller.supplybusswitch.Ess)1 Supplybus (io.openems.impl.controller.supplybusswitch.Supplybus)1 UnitTestWriteChannel (io.openems.test.utils.channel.UnitTestWriteChannel)1 UnitTestSymmetricEssNature (io.openems.test.utils.devicenatures.UnitTestSymmetricEssNature)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 BeforeClass (org.junit.BeforeClass)1