-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fe4937d
Showing
60 changed files
with
4,473 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/target/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>photon</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.m2e.core.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=1.5 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
org.eclipse.jdt.core.compiler.release=disabled | ||
org.eclipse.jdt.core.compiler.source=1.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
activeProfiles= | ||
eclipse.preferences.version=1 | ||
resolveWorkspaceProjects=true | ||
version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>com.strikete</groupId> | ||
<artifactId>photon</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<name>Photon LX Console Plugin Manager</name> | ||
<description>A plugin interface for Light Boards</description> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.illposed.osc</groupId> | ||
<artifactId>javaosc-core</artifactId> | ||
<version>0.6</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-core</artifactId> | ||
<version>2.14.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.yaml</groupId> | ||
<artifactId>snakeyaml</artifactId> | ||
<version>1.27</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
<version>30.0-jre</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>3.2.0</version> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
package com.strikete.photon; | ||
|
||
import java.io.IOException; | ||
import java.net.InetAddress; | ||
|
||
import org.apache.log4j.BasicConfigurator; | ||
import org.apache.log4j.Logger; | ||
|
||
import com.google.common.eventbus.Subscribe; | ||
import com.strikete.photon.events.ChannelCountUpdateEvent; | ||
import com.strikete.photon.events.ChannelUpdateEvent; | ||
import com.strikete.photon.objects.Channel; | ||
import com.strikete.photon.objects.DmxAddress; | ||
import com.strikete.photon.osc.OscInstance; | ||
import com.strikete.photon.osc.OscInstance.OscFormat; | ||
|
||
public class Main { | ||
|
||
/* | ||
* VARIABLES | ||
*/ | ||
|
||
public static final String version = "SNAPSHOT 0.0.1"; | ||
public static Logger log; | ||
|
||
/* | ||
* NON-MAIN METHODS | ||
*/ | ||
|
||
private static void printWelcomeMessage() { //Only to be called after the logger object has been configured | ||
log.info("Welcome to Photon " + version + " ."); | ||
log.info("Photon is authored by Benji Arrigo in conjunction with Strike Theatre Electronics."); | ||
} | ||
|
||
@Subscribe | ||
public void onChannelUpdateEvent(ChannelUpdateEvent e) { | ||
Channel temp = e.getChannel(); | ||
if(temp.getChannelNum() == 3000) { | ||
System.out.println("Channel: " + temp.getChannelNum()); | ||
DmxAddress tempAddr = temp.getAddress(); | ||
System.out.println("Universe: " + tempAddr.getUniverse().getUniverseNum()); | ||
System.out.println("Address: " + tempAddr.getAddressNumber()); | ||
System.out.println("Label: " + temp.getName()); | ||
System.out.println("Manufactuer: " + temp.getManufacturer()); | ||
System.out.println("Fixture Type: " + temp.getType()); | ||
System.out.println("UID: " + temp.getUID()); | ||
System.out.println("Level: " + temp.getLevel()); | ||
} | ||
} | ||
|
||
|
||
|
||
/* | ||
* MAIN METHOD | ||
*/ | ||
|
||
public static void main(String[] args) throws IOException { | ||
|
||
//Create Logger | ||
log = Logger.getLogger(Main.class); | ||
BasicConfigurator.configure(); | ||
|
||
//Print welcome message | ||
printWelcomeMessage(); | ||
|
||
OscInstance osc = new OscInstance(OscFormat.ETC_EOS,"192.168.10.109",6300,6301); | ||
Main main = new Main(); | ||
System.out.println(InetAddress.getLocalHost()); | ||
|
||
osc.init(); | ||
//osc.getEventHandler().register(main); | ||
osc.getObjectUpdater().doBasicUpdate(); | ||
|
||
|
||
try { | ||
Thread.sleep(5000); | ||
} catch (InterruptedException e) { | ||
// TODO Auto-generated catch block | ||
e.printStackTrace(); | ||
} | ||
|
||
osc.getOscSender().sendOscMessage("/eos/out/active/chan"); | ||
System.out.println("message sent"); | ||
//osc.getOscSender().sendOscMessage(osc.getOscMap().KEY_BLIND); | ||
//osc.getOscSender().selectChannel(1); | ||
while(true) { | ||
//osc.getOscSender().sendOscMessage(osc.getOscMap().GET_PATCH_COUNT); | ||
|
||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package com.strikete.photon; | ||
|
||
public class Table { | ||
|
||
/* | ||
* VARIABLES | ||
*/ | ||
private int numOfLegs; | ||
private String material; | ||
|
||
/* | ||
* METHODS | ||
*/ | ||
public int getNumberOfLegs() { | ||
return this.numOfLegs; | ||
} | ||
public String getMaterial() { | ||
return this.material; | ||
} | ||
|
||
public void setNumberOfLegs(int numOfLegsIn) { | ||
this.numOfLegs = numOfLegsIn; | ||
} | ||
public void setMaterial(String materialIn) { | ||
this.material = materialIn; | ||
} | ||
|
||
/* | ||
* CONSTRUCTORS | ||
*/ | ||
public Table() { | ||
this.numOfLegs = 0; | ||
this.material = "wood"; | ||
} | ||
public Table(int numOfLegsIn) { | ||
this.numOfLegs = numOfLegsIn; | ||
this.material = "wood"; | ||
} | ||
public Table(int numOfLegsIn, String materialIn) { | ||
this.numOfLegs = numOfLegsIn; | ||
this.material = materialIn; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
photon/src/main/java/com/strikete/photon/events/BeamPaletteCountUpdateEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.strikete.photon.events; | ||
|
||
import com.strikete.photon.Main; | ||
import com.strikete.photon.osc.OscInstance; | ||
|
||
public class BeamPaletteCountUpdateEvent extends GenericUpdateEvent { | ||
|
||
/* | ||
* VARIABLE | ||
*/ | ||
private int beamPaletteNum; | ||
|
||
/* | ||
* METHOD | ||
*/ | ||
public int getNumberOfBeamPalettes() { | ||
return this.beamPaletteNum; | ||
} | ||
|
||
/* | ||
* CONSTRUCTOR | ||
*/ | ||
public BeamPaletteCountUpdateEvent(OscInstance oscInstanceIn, int beamPaletteNumIn) { | ||
super(oscInstanceIn); | ||
this.beamPaletteNum = beamPaletteNumIn; | ||
Main.log.debug("EVENT TRIGGERED: BeamPaletteCountUpdateEvent at " + this.getTime()); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
photon/src/main/java/com/strikete/photon/events/BeamPaletteUpdateEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.strikete.photon.events; | ||
|
||
import com.strikete.photon.Main; | ||
import com.strikete.photon.objects.BeamPalette; | ||
import com.strikete.photon.osc.OscInstance; | ||
|
||
public class BeamPaletteUpdateEvent extends GenericUpdateEvent { | ||
|
||
/* | ||
* VARIABLES | ||
*/ | ||
private BeamPalette bp; | ||
private int indexNum; | ||
|
||
/* | ||
* METHODS | ||
*/ | ||
public int getIndexNum() { | ||
return this.indexNum; | ||
} | ||
public BeamPalette getBeamPalette() { | ||
return this.bp; | ||
} | ||
|
||
/* | ||
* CONSTRUCTOR | ||
*/ | ||
public BeamPaletteUpdateEvent(OscInstance oscInstanceIn, BeamPalette bpIn, int indexNumIn) { | ||
super(oscInstanceIn); | ||
this.bp = bpIn; | ||
this.indexNum = indexNumIn; | ||
Main.log.debug("EVENT TRIGGERED: BeamPaletteUpdateEvent with Beam Palette " + bpIn.getPaletteNum() + " at " + this.getTime()); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
photon/src/main/java/com/strikete/photon/events/ChannelCountUpdateEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.strikete.photon.events; | ||
|
||
import com.strikete.photon.Main; | ||
import com.strikete.photon.osc.OscInstance; | ||
|
||
public class ChannelCountUpdateEvent extends GenericUpdateEvent { | ||
|
||
/* | ||
* VARIABLE | ||
*/ | ||
private int channelNum; | ||
|
||
/* | ||
* METHOD | ||
*/ | ||
public int getNumberOfChannels() { | ||
return this.channelNum; | ||
} | ||
|
||
/* | ||
* CONSTRUCTOR | ||
*/ | ||
public ChannelCountUpdateEvent(OscInstance oscInstanceIn, int channelNumIn) { | ||
super(oscInstanceIn); | ||
this.channelNum = channelNumIn; | ||
Main.log.debug("EVENT TRIGGERED: ChannelCountUpdateEvent at " + this.getTime()); | ||
} | ||
} |
Oops, something went wrong.