Skip to content

Commit

Permalink
Nightly commit 10/13/2021
Browse files Browse the repository at this point in the history
Added preset and sub data objects
  • Loading branch information
Rusettsten committed Oct 14, 2021
1 parent 889c147 commit 5f05b79
Show file tree
Hide file tree
Showing 2 changed files with 196 additions and 42 deletions.
124 changes: 84 additions & 40 deletions photon/src/main/java/com/strikete/photon/objects/Preset.java
Original file line number Diff line number Diff line change
@@ -1,71 +1,115 @@
package com.strikete.photon.objects;

public class Preset {
import java.util.ArrayList;

public class Preset implements CsvLevelDataSetter {

/*
* VARIABLES
*/
private float presetNum;
private String UID;
private String name;
private int index;
private String uid;
private String label;
private boolean absolute;
private boolean locked;
private Channel[] channels = new Channel[65535];
private int numOfChannels;
private Effect[] effects = new Effect[512];
private int numOfEffects;
private ArrayList<Integer> channelList = new ArrayList<Integer>();
private ArrayList<Integer> byTypeChannelList = new ArrayList<Integer>();
private ArrayList<Integer> effectList = new ArrayList<Integer>();
private ArrayList<Integer> channels = new ArrayList<Integer>();
private ArrayList<String> parameters = new ArrayList<String>();
private ArrayList<Float> levels = new ArrayList<Float>();


/*
* METHODS
* METHODS - GETTERS
*/
public float getPresetNum() {
return this.presetNum;
public float getPresetNumber() {
return presetNum;
}
public String getUID() {
return this.UID;
public int getIndexNumber() {
return index;
}
public String getName() {
return this.name;
public String getUid() {
return uid;
}
public String getLabel() {
return label;
}
public boolean getAbsolute() {
return this.absolute;
return absolute;
}
public boolean getLocked() {
return this.locked;
return locked;
}
public Channel getChannel(int indexNum) {
return this.channels[indexNum];
public ArrayList<Integer> getChannelList() {
return channelList;
}
public int getNumOfChannels() {
return this.numOfChannels;
public ArrayList<Integer> getByTypeChannelList() {
return byTypeChannelList;
}
public Effect getEffect(int indexNum) {
return this.effects[indexNum];
public ArrayList<Integer> getEffectList() {
return effectList;
}
public int getNumOfEffects() {
return this.numOfEffects;
public ArrayList<Integer> getChannels() {
return channels;
}

public void addChannel(Channel channelIn) {
this.channels[numOfChannels] = channelIn;
numOfChannels++;
public ArrayList<String> getParameters() {
return parameters;
}

public void addEffect(Effect effectIn) {
this.effects[numOfEffects] = effectIn;
numOfEffects++;
public ArrayList<Float> getLevels(){
return levels;
}


/*
* CONSTRUCTOR
* METHODS - SETTERS
*/
public Preset(float presetNumIn, String UIDin, String nameIn, boolean absoluteIn, boolean lockedIn) {
this.presetNum = presetNumIn;
this.UID = UIDin;
this.name = nameIn;
public void setLabel(String labelIn) {
this.label = labelIn;
}
public void setAbsolute(boolean absoluteIn) {
this.absolute = absoluteIn;
}
public void setLocked(boolean lockedIn) {
this.locked = lockedIn;
numOfChannels = 0;
numOfEffects = 0;
}
}
public void setChannelList(ArrayList<Integer> channelListIn) {
this.channelList = channelListIn;
}
public void setByTypeChannelList(ArrayList<Integer> byTypeChannelListIn) {
this.byTypeChannelList = byTypeChannelListIn;
}
public void setEffectList(ArrayList<Integer> effectListIn) {
this.effectList = effectListIn;
}
public void addEffect(int effectIn) {
this.effectList.add(effectIn);
}
public void setChannels(ArrayList<Integer> channelsIn) {
this.channels = channelsIn;
}
public void setParameters(ArrayList<String> parametersIn) {
this.parameters = parametersIn;
}
public void setLevels(ArrayList<Float> levelsIn) {
this.levels = levelsIn;
}


/*
* METHODS - INTERFACE
*/
@Override
public void addCsvLevelData(int channelIn, String parameterIn, float levelIn) {
this.channels.add(channelIn);
this.parameters.add(parameterIn);
this.levels.add(levelIn);
}


/*
* CONSTRUCTOR
*/

}
114 changes: 112 additions & 2 deletions photon/src/main/java/com/strikete/photon/objects/Sub.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.ArrayList;

public class Sub {
public class Sub implements CsvLevelDataSetter {

/*
* VARIABLES
Expand Down Expand Up @@ -36,16 +36,126 @@ public int getSubNumber() {
public int getIndexNumber() {
return index;
}
public String getUid() {
return uid;
}
public String getLabel() {
return label;
}
public String getMode() {
return mode;
}
public String getFaderMode() {
return faderMode;
}
public boolean getHtp() {
return htp;
}
public boolean getExclusive() {
return exclusive;
}
public boolean getBackground() {
return background;
}
public boolean getRestore() {
return restore;
}
public String getPriority() {
return priority;
}
public String getUpTime() {
return upTime;
}
public String getDwellTime() {
return dwellTime;
}
public String getDownTime() {
return downTime;
}
public ArrayList<Integer> getEffectList() {
return effectList;
}
public ArrayList<Integer> getChannels() {
return channels;
}
public ArrayList<String> getParameters() {
return parameters;
}
public ArrayList<Float> getLevels() {
return levels;
}


/*
* METHODS - SETTERS
*/
public void setLabel(String labelIn) {
this.label = labelIn;
}
public void setMode(String modeIn) {
this.mode = modeIn;
}
public void setFaderMode(String faderModeIn) {
this.faderMode = faderModeIn;
}
public void setHtp(boolean htpIn) {
this.htp = htpIn;
}
public void setExclusive(boolean exclusiveIn) {
this.exclusive = exclusiveIn;
}
public void setBackground(boolean backgroundIn) {
this.background = backgroundIn;
}
public void setRestore(boolean restoreIn) {
this.restore = restoreIn;
}
public void setPriority(String priorityIn) {
this.priority = priorityIn;
}
public void setUpTime(String upTimeIn) {
this.upTime = upTimeIn;
}
public void setDwellTime(String dwellTimeIn) {
this.dwellTime = dwellTimeIn;
}
public void setDownTime(String downTimeIn) {
this.downTime = downTimeIn;
}
public void setEffectList(ArrayList<Integer> effectListIn) {
this.effectList = effectListIn;
}
public void addEffect(int effectIn) {
this.effectList.add(effectIn);
}
public void setChannels(ArrayList<Integer> channelsIn) {
this.channels = channelsIn;
}
public void setParameters(ArrayList<String> parametersIn) {
this.parameters = parametersIn;
}
public void setLevels(ArrayList<Float> levelsIn) {
this.levels = levelsIn;
}


/*
* METHODS - INTERFACES
*/
@Override
public void addCsvLevelData(int channelIn, String parameterIn, float levelIn) {
this.channels.add(channelIn);
this.parameters.add(parameterIn);
this.levels.add(levelIn);
}


/*
* CONSTRUCTOR
*/

public Sub(int subNumIn, int indexIn, String uidIn) {
this.subNum = subNumIn;
this.index = indexIn;
this.uid = uidIn;
}
}

0 comments on commit 5f05b79

Please sign in to comment.