-
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
Showing
77 changed files
with
608 additions
and
612 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
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
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
42 changes: 42 additions & 0 deletions
42
receivers/jvm/java-receiver-token/src/main/java/net/zscript/javareceiver/core/LockSet.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,42 @@ | ||
package net.zscript.javareceiver.core; | ||
|
||
import java.util.Iterator; | ||
|
||
public class LockSet { | ||
private final byte[] locks; | ||
|
||
public static LockSet from(Iterator<Byte> data) { | ||
byte[] locks = new byte[ZscriptLocks.LOCK_BYTENUM]; | ||
|
||
int i = 0; | ||
for (Iterator<Byte> iterator = data; i < ZscriptLocks.LOCK_BYTENUM && iterator.hasNext();) { | ||
locks[i++] = iterator.next(); | ||
} | ||
return new LockSet(locks); | ||
} | ||
|
||
public static LockSet empty() { | ||
byte[] locks = new byte[ZscriptLocks.LOCK_BYTENUM]; | ||
for (int i = 0; i < locks.length; i++) { | ||
locks[i] = (byte) 0; | ||
} | ||
return new LockSet(locks); | ||
} | ||
|
||
public static LockSet allLocked() { | ||
byte[] locks = new byte[ZscriptLocks.LOCK_BYTENUM]; | ||
for (int i = 0; i < locks.length; i++) { | ||
locks[i] = (byte) 0xFF; | ||
} | ||
return new LockSet(locks); | ||
} | ||
|
||
private LockSet(byte[] locks) { | ||
this.locks = locks; | ||
} | ||
|
||
byte[] getLocks() { | ||
return locks; | ||
} | ||
|
||
} |
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
42 changes: 0 additions & 42 deletions
42
...ers/jvm/java-receiver-token/src/main/java/net/zscript/javareceiver/core/ZcodeLockSet.java
This file was deleted.
Oops, something went wrong.
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
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
6 changes: 3 additions & 3 deletions
6
...areceiver/core/ZcodeCommandOutStream.java → ...eceiver/core/ZscriptCommandOutStream.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
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
6 changes: 3 additions & 3 deletions
6
...vm/java-receiver-token/src/main/java/net/zscript/javareceiver/execution/ActionSource.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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
package net.zscript.javareceiver.execution; | ||
|
||
import net.zscript.javareceiver.core.Zscript; | ||
import net.zscript.javareceiver.core.ZcodeOutStream; | ||
import net.zscript.javareceiver.core.OutStream; | ||
|
||
public interface ActionSource { | ||
ZcodeAction getAction(); | ||
ZscriptAction getAction(); | ||
|
||
ZcodeOutStream getOutStream(Zscript zscript); | ||
OutStream getOutStream(Zscript zscript); | ||
} |
Oops, something went wrong.