|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hermes.postoffice.OscMessage
public class OscMessage
Message representing an OSC message.
Implements Message so that it can be used in PostOffice.
OSCMessages have arguments, which can be untyped, so great care must be taken by the user to ensure types.
Behavior for retrieving messages is First In, Last Out, meaning if you call a getAndRemove method, you'll receive arguments in the order that they were added to the message before it was sent.
Example: imagine your OSCMessage has a list of arguments: int A, string B, float C.
First, you would call "getAndRemoveInt()" which would return the int value of A.
Next, you would call "getAndRemoveString()" which would return string B.
Lastly, you would call getAndRemoveFloat()" which would return string C.
Take great care!!!! You should be well-aware of how many arguments a message will contain, and what types it has.
Constructor Summary | |
---|---|
protected |
OscMessage(com.illposed.osc.OSCMessage message)
Constructor taking an illposed OSCMessage. |
|
OscMessage(java.lang.String address,
java.lang.Object[] contents)
Basic constructor for unpacked OSCMessage. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Equality check for OscMessage, compares messages based on Address string. |
java.lang.String |
getAddress()
Gets the OSCAddress that this message pertains to. |
float |
getAndRemoveFloat()
Retrieves a float argument contained in the OSCMessage you've received. |
int |
getAndRemoveInt()
Retrieves an int argument contained in the OSCMessage you've received. |
java.lang.String |
getAndRemoveString()
Retrieves a String argument contained in the OSCMessage you've received. |
protected java.lang.Object[] |
getContents()
Gets an object[] of the inner contents of an OSCMessage. |
int |
getNumberOfRemainingArguments()
Returns the number of arguments available for extraction from this OSCMessage. |
java.lang.String |
getTypeTagOfNextArgument()
Get the typetag of the next argument in this OSCMessage. |
boolean |
hasRemainingArguments()
Method to find out if the user has any remaining arguments in the OSCMessage. |
protected com.illposed.osc.OSCMessage |
toIllposed()
Get an illposed version of this message. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OscMessage(java.lang.String address, java.lang.Object[] contents)
address
- Address of OSCMessagecontents
- Contents of OSCMessageprotected OscMessage(com.illposed.osc.OSCMessage message)
message
- a packed OSCMessage in illposed's formatMethod Detail |
---|
public int getNumberOfRemainingArguments()
public boolean hasRemainingArguments()
public int getAndRemoveInt()
If your OSCMessage contains multiple arguments, call another "getAndRemove" method corresponding to the type of the next argument.
public java.lang.String getAndRemoveString()
If your OSCMessage contains multiple arguments, call another "getAndRemove" method corresponding to the type of the next argument.
public float getAndRemoveFloat()
If your OSCMessage contains multiple arguments, call another "getAndRemove" method corresponding to the type of the next argument.
public java.lang.String getTypeTagOfNextArgument()
public java.lang.String getAddress()
protected java.lang.Object[] getContents()
protected com.illposed.osc.OSCMessage toIllposed()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |