Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #11 from creising/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
creising committed Nov 8, 2014
2 parents 9279c62 + 6f2cc46 commit 120f8ad
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 40 deletions.
17 changes: 12 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
language: java

jdk:
- oraclejdk7

env:
- TERM=dumb

matrix:
- TERM=dumb
global:
- secure: ZmCjQ4x9bFxBdd7JPzGrPKDa5F7cpg0YuT6ojIg0WsoC8ZeUXMuTUDrg9s2Aqi5VlEY0+y/FPf14cY8KB8YGUQ1DrMrNEpT3g69mF0KiyVb9uhSjdWYq9OoGIHL8uvP1C/foszmUTYVEKron2fr6fjX/cvsYuj4TdSpi2nd9gEI=
- secure: XWT6dIx4cJToUZetkzULtYWbfLIbb5L+ALIdClHA2a1iedtO25LpkSTFNWHf1LdOUwEq6mt8JCMoDiHhWyMJtBSnsCmVL1FgS16K4zfu8u8m0qM4vejRiM7lmOrE1VQsoNEEgW1f3owd8KmbQZqN6qOpFghwS74V4sDf66XJWGY=
after_success:
- ./gradlew jacocoTestReport coveralls

- echo "$TRAVIS_BRANCH"
- if [[ "$TRAVIS_BRANCH" != "master" ]]; then
./gradlew uploadArchives -PnexusUsername="${OSSUNAME}" -PnexusPassword="${OSSPASS}";
else
./gradlew coveralls;
fi
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,35 @@ Currently, the client library does not throttle requests to the CueServer. As
noted in CueServer's documentation, new requests should only be sent after a
response from the previous request has been received from CueServer.

### Details
For further information regarding the cue server, please visit:
[Interactive Technologies](http://interactive-online.com)
###Project Structure
`./client` contains all code related to the client library.
`./cli` contains all of the code related to the example command line interface.

###Compilation
The client library uses the [Gradle](http://www.gradle.org) build system. If
you're new to Gradle, here are a couple of common commands to get you started.
All commands should be run from the root directory.

`./gradlew build`: Compiles all code and runs the unit tests.

`./gradle javadoc`: Generate Javadoc.

`./gradlew clean`: Removes the build directories.

`./gradlew cli:installApp`: Creates a JVM application along with libs and OS
specific scripts. Once this command is run, the application can be found in:
`cli/build/install/`.

####Dependencies
The client library has the following dependencies:

* Google's guava v18.0
* Apache's httpclient v4.3.5
* Your favorite SLF4J library for logging

### Additional Reading
For further information regarding the CueServer, please visit:
[Interactive Technologies](http://interactive-online.com).

### Supported Operations
The client library currently supports the following operations:
Expand Down
15 changes: 15 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
### Version 1.1

### Version 1.0 (11/7/2014)
- Initial release of client library which includes support for:

* Retrieval of system information
* Retrieval of playback information
* Retrieval of level from the DMX output
* Playing a cue on a playback
* Clearing a playback
* Setting a channel
* Setting a range of channels
* Recording a cue
* Updating a cue
* Deleting a cue
6 changes: 3 additions & 3 deletions client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apply plugin: 'maven'
apply plugin: 'com.bmuschko.nexus'

group = "org.urbanbyte.cueserver"
version = "1.0"
version = "1.1-SNAPSHOT"

repositories {
mavenCentral()
Expand Down Expand Up @@ -84,7 +84,7 @@ modifyPom {
project {
name 'CueServer HTTP client'
description 'Client library for the CueServer HTTP interface.'
url 'https://urbanbyte.org'
url 'http://urbanbyte.org'
inceptionYear '2014'
artifactId = "cueserver-client"

Expand Down Expand Up @@ -114,7 +114,7 @@ modifyPom {
}

extraArchive {
sources = false
sources = true
tests = false
javadoc = true
}
Expand Down
51 changes: 29 additions & 22 deletions client/src/main/java/org/urbanbyte/cueserver/CueServerClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
import org.urbanbyte.cueserver.data.system.SystemInfo;

/**
* Allows client to both retrieve and send commands to a CueServer.
* The {@code CueServerClient} facilitates interaction with a CueServer. Clients
* have the ability to retrieve state related information, and send commands to
* a CueServer.
* <p>
* author: Chris Reising
*/
Expand Down Expand Up @@ -51,8 +53,8 @@ public interface CueServerClient
/**
* Executes the given cue number on {@link Playback#PLAYBACK_1}.
*
* @param cueNumber The cue number to execute. The CueServer only support up
* to one decimal place for cue number (e.g., 10.1). Any
* @param cueNumber The cue number to execute. The CueServer only supports
* up to one decimal place for cue number (e.g., 10.1). Any
* values greater than one decimal place will be truncated
* @throws IllegalArgumentException if {@code cueNumber} is not positive.
*/
Expand All @@ -61,8 +63,8 @@ public interface CueServerClient
/**
* Executes the given cue number on the given playback.
*
* @param cueNumber The cue number to execute. The CueServer only support up
* to one decimal place for cue number (e.g., 10.1). Any
* @param cueNumber The cue number to execute. The CueServer only supports
* up to one decimal place for cue number (e.g., 10.1). Any
* values greater than one decimal place will be truncated
* @param playback the playback to execute the cue on.
* @throws IllegalArgumentException if {@code cueNumber} is not positive.
Expand All @@ -71,27 +73,29 @@ public interface CueServerClient
void playCue(double cueNumber, Playback playback);

/**
* Clear the given playback.
* Clears the given playback.
*
* @param playback the playback to clear.
* @throws NullPointerException if {@code playback} is {@code null}.
*/
void clearPlayback(Playback playback);

/**
* Sets the given channel to a level on playback 1 using a time of 0.
* Sets the given channel to a level on {@link Playback#PLAYBACK_1} using a
* time of 0.
*
* @param channel The channel to set. Must be within [1, 512].
* @param value The value. Must be within [0, 255].
* @throws IllegalArgumentException if any parameters is out of bounds.
* @param value The value of the channel level. Must be within [0, 255].
* @throws IllegalArgumentException if any argument is out of bounds.
*/
void setChannel(int channel, int value);

/**
* Sets the given channel to a level on playback 1 using the provided time.
* Sets the given channel to a level on {@link Playback#PLAYBACK_1} using
* the provided time.
*
* @param channel The channel to set. Must be within [1, 512].
* @param value The value. Must be within [0, 255].
* @param value The value of the channel level. Must be within [0, 255].
* @param timeSeconds The time in seconds for the channel to complete its
* transition. Must be within [0, 65000]. The precision
* is up to a tenth of a second.
Expand All @@ -104,7 +108,7 @@ public interface CueServerClient
* provided time.
*
* @param channel The channel to set. Must be within [1, 512].
* @param value The value. Must be within [0, 255].
* @param value The value of the channel level. Must be within [0, 255].
* @param timeSeconds The time in seconds for the channel to complete its
* transition. Must be within [0, 65000]. The precision
* is up to a tenth of a second.
Expand All @@ -116,24 +120,25 @@ void setChannel(int channel, int value, double timeSeconds,
Playback playback);

/**
* Sets the range of channels to a level on playback 1 using a time of 0.
* Sets the range of channels to a level on {@link Playback#PLAYBACK_1}
* using a time of 0.
*
* @param startChannel The beginning of the range. Must be within [1, 512].
* @param endChannel The end of the range. Must be within [1, 512].
* @param value The value to set the channel to. Must be within [0, 255].
* @param value The value of the channel level. Must be within [0, 255].
* @throws IllegalArgumentException if the end if greater than the start
* range, or if any value is outside of its
* bounds.
*/
void setChannelRange(int startChannel, int endChannel, int value);

/**
* Sets the range of channels to a level on playback 1 using the provided
* time.
* Sets the range of channels to a level on {@link Playback#PLAYBACK_1}
* using the provided time.
*
* @param startChannel The beginning of the range. Must be within [1, 512].
* @param endChannel The end of the range. Must be within [1, 512].
* @param value The value to set the channel to. Must be within [0, 255].
* @param value The value of the channel level. Must be within [0, 255].
* @param timeSeconds The time in seconds for the channel to complete its
* transition. Must be within [0, 65000].
* @throws IllegalArgumentException if the end if greater than the start
Expand All @@ -144,17 +149,17 @@ void setChannelRange(int startChannel, int endChannel, int value,
double timeSeconds);

/**
* Sets the range of channels to a level on playback 1 using the provided
* time.
* Sets the range of channels to a level on {@link Playback#PLAYBACK_1}
* using the provided time.
*
* @param startChannel The beginning of the range. Must be within [1, 512].
* @param endChannel The end of the range. Must be within [1, 512].
* @param value The value to set the channel to. Must be within [0, 255].
* @param value The value of the channel level. Must be within [0, 255].
* @param timeSeconds The time in seconds for the channel to complete its
* transition. Must be within [0, 65000]. The precision
* is up to a tenth of a second.
*@param playback the playback controlling the channel.
* @throws IllegalArgumentException if the end if greater than the start
* @throws IllegalArgumentException if the end is greater than the start
* range, or if any value is outside of its
* bounds.
* @throws NullPointerException if {@code playback} is {@code null}
Expand All @@ -169,7 +174,9 @@ void setChannelRange(int startChannel, int endChannel, int value,
* CueServer only supports up to one decimal place for cue
* number (e.g., 10.1). The value passed in will be
* truncated to accommodate this.
* @param uptimeSecs the fade's uptime in seconds. Must be within [0, 65000]
* @param uptimeSecs the fade's uptime in seconds. Must be within
* [0, 65000]. The precision is up to a tenth of a
* second.
* @param downtimeSecs the fade's downtime in seconds. Must be within
* [0, 65000]. The precision is up to a tenth of a
* second.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public double getNumber()
/**
* Gets the name of the cue.
*
* @return Cna be {@code null}.
* @return Can be {@code null}.
*/
public String getName()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import static com.google.common.base.Preconditions.checkNotNull;

/**
* Contains common information for a CueServer's playback.
* Contains the state information for a CueServer's playback.
* <p>
* author: Chris Reising
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import static com.google.common.base.Preconditions.checkNotNull;

/**
* Communicates with a CueServer over HTTP to request real-time information
* about the show it is playing back, as well as send live data to CueServer
* that it should output to the connected devices.
* The {@code CueServerClient} facilitates interaction with a CueServer. Clients
* have the ability to retrieve state related information, and send commands to
* a CueServer using it HTTP interface.
* <p>
* author: Chris Reising
*/
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Oct 31 19:20:26 EDT 2014
#Thu Nov 06 23:36:47 EST 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip

0 comments on commit 120f8ad

Please sign in to comment.