org.llrp.ltk.generated.messages
Class ERROR_MESSAGE

java.lang.Object
  extended by org.llrp.ltk.types.LLRPMessage
      extended by org.llrp.ltk.generated.messages.ERROR_MESSAGE

public class ERROR_MESSAGE
extends LLRPMessage

The Reader SHALL discard the message if there is at least one error in the message, or cannot be fully processed. In addition, no portion of the message containing an error SHALL be executed by the Reader. In case the message has one or more errors, the Reader SHALL return at least one error parameter for one of the errors. The Reader MAY return more than one error parameter, one for each error. The errors are conveyed using a combination of "generic error codes", a pointer to the culprit parameter/field, and a description of the error encoded as a string of UTF-8 characters.Typically the errors in the LLRP defined messages are conveyed inside of the responses from the Reader. However, in cases where the message received by the Reader contains an unsupported message type, or a CUSTOM_MESSAGE with unsupported parameters or fields, the Reader SHALL respond with the ERROR_MESSAGE.When a Reader or Client receives a command or notification with a version that is not supported, the receiver SHALL send an ERROR_MESSAGE in reply consisting of: A version that is the same as the received message, the message ID that matches the received message, and an LLRPStatusParameter with the ErrorCode set to M_UnsupportedVersion. This message SHALL contain no sub-parameters (such as Field Error, Parameter Error).Readers and Clients SHALL not respond to an ERROR_MESSAGE. This message is issued by the Reader to the Client, and it contains the LLRPStatus parameter that describes the error in the message. See also LLRP Specification Section 14.1.1 and LLRP Specification Section 16.1.35


Field Summary
protected  LLRPStatus lLRPStatus
           
static java.lang.String RESPONSETYPE
           
static SignedShort TYPENUM
           
 
Fields inherited from class org.llrp.ltk.types.LLRPMessage
messageID, messageLength, messageReservedLength, MINHEADERLENGTH, reserved, RESERVEDLENGTH, TYPENUMBERLENGTH, version, VERSIONLENGTH
 
Constructor Summary
ERROR_MESSAGE()
          empty constructor to create new message with LLRP version set to 1.0 (0x1).
ERROR_MESSAGE(byte[] byteArray)
          Constructor to create message from binary encoded message calls decodeBinary to decode message.
ERROR_MESSAGE(org.jdom.Document document)
          Constructor to create message from xml encoded message calls decodeXML to decode message.
ERROR_MESSAGE(LLRPBitList list)
          Constructor to create message from binary encoded message calls decodeBinary to decode message.
 
Method Summary
protected  void decodeBinarySpecific(LLRPBitList binary)
          to be implemented by specific message.
 void decodeXML(org.jdom.Document document)
          create objects from xml.
protected  LLRPBitList encodeBinarySpecific()
          encoding function - has to be implemented by each message.
 org.jdom.Document encodeXML()
          create xml representation of this parameter.
 LLRPStatus getLLRPStatus()
          get lLRPStatus of type LLRPStatus .
 java.lang.String getName()
          name of message (same as class name)
 java.lang.String getResponseType()
          response message type awaited
 SignedShort getTypeNum()
          return uniuque type number.
 void setLLRPStatus(LLRPStatus lLRPStatus)
          set lLRPStatus of type LLRPStatus.
 
Methods inherited from class org.llrp.ltk.types.LLRPMessage
decodeBinary, encodeBinary, getMessageID, getMessageLength, getVersion, isValidXMLMessage, setMessageID, setVersion, toBinaryString, toHexString, toXMLString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPENUM

public static final SignedShort TYPENUM

RESPONSETYPE

public static final java.lang.String RESPONSETYPE
See Also:
Constant Field Values

lLRPStatus

protected LLRPStatus lLRPStatus
Constructor Detail

ERROR_MESSAGE

public ERROR_MESSAGE()
empty constructor to create new message with LLRP version set to 1.0 (0x1).


ERROR_MESSAGE

public ERROR_MESSAGE(LLRPBitList list)
              throws InvalidLLRPMessageException
Constructor to create message from binary encoded message calls decodeBinary to decode message.

Parameters:
list - to be decoded
Throws:
InvalidLLRPMessageException

ERROR_MESSAGE

public ERROR_MESSAGE(byte[] byteArray)
              throws InvalidLLRPMessageException
Constructor to create message from binary encoded message calls decodeBinary to decode message.

Parameters:
byteArray - representing message
Throws:
InvalidLLRPMessageException

ERROR_MESSAGE

public ERROR_MESSAGE(org.jdom.Document document)
              throws InvalidLLRPMessageException
Constructor to create message from xml encoded message calls decodeXML to decode message.

Parameters:
document - to be decoded
Throws:
InvalidLLRPMessageException
Method Detail

encodeBinarySpecific

protected LLRPBitList encodeBinarySpecific()
                                    throws InvalidLLRPMessageException
encoding function - has to be implemented by each message.

Specified by:
encodeBinarySpecific in class LLRPMessage
Returns:
LLRPBitList
Throws:
InvalidLLRPMessageException

encodeXML

public org.jdom.Document encodeXML()
                            throws InvalidLLRPMessageException
create xml representation of this parameter.

Specified by:
encodeXML in class LLRPMessage
Returns:
Dom Document
Throws:
InvalidLLRPMessageException

decodeBinarySpecific

protected void decodeBinarySpecific(LLRPBitList binary)
                             throws InvalidLLRPMessageException
to be implemented by specific message.

Specified by:
decodeBinarySpecific in class LLRPMessage
Parameters:
binary - without header
Throws:
InvalidLLRPMessageException

decodeXML

public void decodeXML(org.jdom.Document document)
               throws InvalidLLRPMessageException
create objects from xml.

Specified by:
decodeXML in class LLRPMessage
Parameters:
document - document as jdom document
Throws:
InvalidLLRPMessageException

setLLRPStatus

public void setLLRPStatus(LLRPStatus lLRPStatus)
set lLRPStatus of type LLRPStatus.

Parameters:
lLRPStatus - to be set

getLLRPStatus

public LLRPStatus getLLRPStatus()
get lLRPStatus of type LLRPStatus .

Returns:
LLRPStatus

getResponseType

public java.lang.String getResponseType()
Description copied from class: LLRPMessage
response message type awaited

Specified by:
getResponseType in class LLRPMessage
Returns:
String

getName

public java.lang.String getName()
Description copied from class: LLRPMessage
name of message (same as class name)

Specified by:
getName in class LLRPMessage
Returns:
String

getTypeNum

public SignedShort getTypeNum()
return uniuque type number.

Specified by:
getTypeNum in class LLRPMessage
Returns:
SignedShort holding unique type number


Copyright © 2007 ETH Zurich.