Package de.freaklamarsch.systarest
Enum STouchProtocol.STouchCommand
java.lang.Object
java.lang.Enum<STouchProtocol.STouchCommand>
de.freaklamarsch.systarest.STouchProtocol.STouchCommand
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<STouchProtocol.STouchCommand>
,java.lang.constant.Constable
- Enclosing class:
- STouchProtocol
public static enum STouchProtocol.STouchCommand extends java.lang.Enum<STouchProtocol.STouchCommand>
Enum used to map the command ids used by the S-Touch protocol to display
functions
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
-
Enum Constant Summary
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description private
STouchCommand(int id, int length)
-
Method Summary
Modifier and Type Method Description private static int
findNext0(java.nio.ByteBuffer buffer, int offset)
static STouchProtocol.STouchCommand
getCmd(int id)
int
length(java.nio.ByteBuffer buffer)
Calculates the length of an STouchCommand, based on the bytes at the current position of the ByteBuffer.static STouchProtocol.STouchCommand
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static STouchProtocol.STouchCommand[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
Enum Constant Details
-
DISPLAY_SWITCHON
-
DISPLAY_SWITCHOFF
-
DISPLAY_SETSTYLE
-
DISPLAY_SETINVERS
-
DISPLAY_SETFORECOLOR
-
DISPLAY_SETBACKCOLOR
-
DISPLAY_SETFONTTYPE
-
DISPLAY_SETPIXEL
-
DISPLAY_MOVETO
-
DISPLAY_LINETO
-
DISPLAY_DRAWRECT
-
DISPLAY_DRAWARC
-
DISPLAY_DRAWROUNDRECT
-
DISPLAY_DRAWSYMBOL
-
DISPLAY_DELETESYMBOL
-
DISPLAY_SETXY
-
DISPLAY_PUTC
-
DISPLAY_PRINT
-
DISPLAY_PRINTXY
-
DISPLAY_PUTCROT
-
DISPLAY_PRINTROT
-
DISPLAY_CALIBRATETOUCH
-
DISPLAY_SYNCNOW
-
DISPLAY_SETBACKLIGHT
-
DISPLAY_SETBUZZER
-
DISPLAY_SETCLICK
-
DISPLAY_SETBUTTON
-
DISPLAY_DELBUTTON
-
DISPLAY_SETTEMPOFFSETS
-
SYSTEM_GETSYSTEM
-
SYSTEM_GOSYSTEM
-
SYSTEM_CLEARID
-
SYSTEM_GETRESOURCEINFO
-
SYSTEM_ERASERESOURCE
-
SYSTEM_FLASHRESOURCE
-
SYSTEM_ACTIVATERESOURCE
-
SYSTEM_SETCONFIG
-
SYSTEM_CLEARAPP
-
SYSTEM_FLASHAPP
-
SYSTEM_ACTIVATEAPP
-
TYPE_BYTE
-
TYPE_SHORT_INTEGER
-
TYPE_INTEGER
-
TYPE_MAC_ADDRESS
-
TYPE_COMMAND
-
-
Field Details
-
id
private final int id -
length
private final int length
-
-
Constructor Details
-
STouchCommand
private STouchCommand(int id, int length)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getCmd
-
length
public int length(java.nio.ByteBuffer buffer)Calculates the length of an STouchCommand, based on the bytes at the current position of the ByteBuffer. This is done without modifying the current position of the ByteBuffer outside this call.- Parameters:
buffer
- the received message buffer from the S-touch device- Returns:
- the length of the command
-
findNext0
private static int findNext0(java.nio.ByteBuffer buffer, int offset)
-