congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Attribute
Code IndexAdd Tabnine to your IDE (free)

How to use
Attribute
in
org.ccsds.moims.mo.mal.structures

Best Java code snippets using org.ccsds.moims.mo.mal.structures.Attribute (Showing top 9 results out of 315)

origin: int.esa.nmf.core/helper-tools

/**
 * Checks if an attribute is an Identifier, String or URI MAL data type
 *
 * @param obj The attribute
 * @return True if the object can be read as a string
 */
public static boolean isStringAttribute(Attribute obj) {
  Integer shortFormPart = obj.getTypeShortForm();
  if (shortFormPart == 6) { // Identifier
    return true;
  }
  if (shortFormPart == 15) { // String
    return true;
  }
  if (shortFormPart == 18) { // URI
    return true;
  }
  return false;
}
origin: int.esa.nmf.core.moservices.impl/ccsds-com

@Override
public void encodeAttribute(final Attribute value) throws MALException
{
 try
 {
  checkForNull(value);
  outputStream.addByte(internalEncodeAttributeType(value.getTypeShortForm().byteValue()));
  value.encode(this);
 }
 catch (IOException ex)
 {
  throw new MALException(ENCODING_EXCEPTION_STR, ex);
 }
}
origin: int.esa.nmf.core.moservices.impl/ccsds-mc

public static double getDouble(Attribute attr) {
  int type = attr.getTypeShortForm();
  switch (type) {
    case Attribute._DOUBLE_TYPE_SHORT_FORM:
      //Already double.
      return ((Union) attr).getDoubleValue();
    case Attribute._SHORT_TYPE_SHORT_FORM:
      // Short.
      return ((Union) attr).getShortValue();
    case Attribute._USHORT_TYPE_SHORT_FORM:
      // UShort
      return ((UShort) attr).getValue();
    case Attribute._INTEGER_TYPE_SHORT_FORM:
      // Integer
      return ((Union) attr).getIntegerValue();
    case Attribute._UINTEGER_TYPE_SHORT_FORM:
      // UInteger
      return ((UInteger) attr).getValue();
    case Attribute._LONG_TYPE_SHORT_FORM:
      // Long
      return ((Union) attr).getLongValue();
  }
  return 0;
}
origin: int.esa.ccsds.mo/ENCODING_GEN

@Override
public void encodeAttribute(final Attribute value) throws MALException
{
 try
 {
  checkForNull(value);
  outputStream.addByte(internalEncodeAttributeType(value.getTypeShortForm().byteValue()));
  value.encode(this);
 }
 catch (IOException ex)
 {
  throw new MALException(ENCODING_EXCEPTION_STR, ex);
 }
}
origin: int.esa.nmf.core.moservices.impl/ccsds-mc

  arg.setRawType(Union.DOUBLE_TYPE_SHORT_FORM.byteValue());
} else {
  arg.setRawType(argumentValue.getValue().getTypeShortForm().byteValue()); // Check what is the type and stamp it
origin: int.esa.nmf.core.moservices.impl/ccsds-mc

  pDef.setRawType(Union.DOUBLE_TYPE_SHORT_FORM.byteValue());
} else {
  pDef.setRawType(parameters.get(i).getParameterValue().getRawValue().getTypeShortForm().byteValue()); // Check what is the type and stamp it
origin: int.esa.nmf.core.moservices.impl/ccsds-com

if (compositeFilter.getFieldValue().getTypeShortForm() != 15) {  // Is it String?
  return false;
origin: int.esa.nmf.core.moservices.impl/ccsds-mc

if (!newValue.getRawValue().getTypeShortForm().equals(new Integer(pDef.getRawType()))) {
  invIndexList.add(new UInteger(index));
  continue;
origin: int.esa.nmf.core.moservices.impl/ccsds-mc

int defRawType = actionDef.getArguments().get(index).getRawType().intValue();
int defConvType = actionDef.getArguments().get(index).getConvertedType().intValue();
int instType = actionInstance.getArgumentValues().get(index).getValue().getTypeShortForm();
boolean isRawValue = (actionInstance.getIsRawValue() == null)
    || (actionInstance.getIsRawValue().get(index) == null)
org.ccsds.moims.mo.mal.structuresAttribute

Most used methods

  • getTypeShortForm
  • encode

Popular in Java

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JOptionPane (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now