org.fosstrak.llrp.commander.util
Class LLRPFactory

java.lang.Object
  extended by org.fosstrak.llrp.commander.util.LLRPFactory

public class LLRPFactory
extends java.lang.Object

This class lets you generate default LLRP messages automatically.

Author:
Ulrich Etter, ETHZ

Constructor Summary
LLRPFactory()
           
 
Method Summary
static org.llrp.ltk.types.LLRPMessage createLLRPMessage(java.lang.String messageType)
          Creates a new LLRP message of the given type.
static org.llrp.ltk.types.LLRPType createLLRPType(java.lang.String typeName, java.lang.String value)
          Creates a new LLRPType of the given name with the given value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LLRPFactory

public LLRPFactory()
Method Detail

createLLRPMessage

public static org.llrp.ltk.types.LLRPMessage createLLRPMessage(java.lang.String messageType)
Creates a new LLRP message of the given type. All mandatory parameters are set (recursively) and all fields are initialized by default values. Lists that may not be empty are filled with just one parameter. In case of a choice, just the first choice is made.

Parameters:
messageType - the type of the message that should be created (e.g. ADD_ROSPEC)
Returns:
the newly created message

createLLRPType

public static org.llrp.ltk.types.LLRPType createLLRPType(java.lang.String typeName,
                                                         java.lang.String value)
                                                  throws java.lang.Exception
Creates a new LLRPType of the given name with the given value.

Parameters:
typeName - the name of the type to create (e.g. UnsignedInteger)
value - (e.g. "1")
Returns:
the newly created LLRPType
Throws:
java.lang.Exception - if the given value can not be parsed


Copyright © 2009. All Rights Reserved.