org.openmuc.jsml.structures
Class ASNObject

java.lang.Object
  extended by org.openmuc.jsml.structures.ASNObject
Direct Known Subclasses:
Choice, EndOfSmlMessage, ImplicitChoice, Integer16, Integer32, Integer64, Integer8, ListOf, OctetString, SML_Boolean, SML_MessageBody, Unsigned16, Unsigned32, Unsigned64, Unsigned8

public abstract class ASNObject
extends java.lang.Object


Field Summary
protected  boolean isOptional
          true if the Object is Optional
protected  boolean isSelected
          true if the Object is selected
 
Constructor Summary
ASNObject()
           
 
Method Summary
abstract  void code(java.io.DataOutputStream os)
          encodes this object and writes it to the stream os.
abstract  boolean decode(java.io.DataInputStream is)
          decodes the data from the InputStream and writes it to an object
 boolean isOptional()
          returns if this object is optional
 boolean isSelected()
          returns if this object is selected
abstract  void print()
          prints the content or type of the object to stdout
 void setOptional()
          marks this object as optional
 void setSelected()
          marks this object as selected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isOptional

protected boolean isOptional
true if the Object is Optional


isSelected

protected boolean isSelected
true if the Object is selected

Constructor Detail

ASNObject

public ASNObject()
Method Detail

code

public abstract void code(java.io.DataOutputStream os)
                   throws java.io.IOException
encodes this object and writes it to the stream os.

Parameters:
os -
Throws:
java.io.IOException - if something went wrong while writing to the stream

decode

public abstract boolean decode(java.io.DataInputStream is)
                        throws java.io.IOException
decodes the data from the InputStream and writes it to an object

Parameters:
is -
Returns:
true if successfully decoded
Throws:
java.io.IOException - if something went wrong while reading from the stream

print

public abstract void print()
prints the content or type of the object to stdout


setOptional

public void setOptional()
marks this object as optional


setSelected

public void setSelected()
marks this object as selected


isSelected

public boolean isSelected()
returns if this object is selected

Returns:
boolean

isOptional

public boolean isOptional()
returns if this object is optional

Returns:
boolean


Copyright © 2011. All Rights Reserved.