POGO Java Program


pogo.gene
Class PogoClass

java.lang.Object
  |
  +--pogo.gene.PogoClass

public class PogoClass
extends java.lang.Object
implements PogoDefs, TangoDs.TangoConst

This is the most important class for pogo project. This is this class and its fields which define all DS project. That means that it is used to read, create or generate source file. Its methods are mainely to initialize PogoGlass object from source file.

Version:
$Revision: 1.22 $
Author:
$Author: verdier $

Field Summary
 AttribTable attributes
          Device server attributes vector.
 java.lang.String author
          Author Name.
 java.lang.String class_desc
          Device server class description.
 java.lang.String class_name
          Device server class name.
 CmdTable commands
          Device server commands vector.
 int in_language
          Device server input language.
 int language
          Device server output language.
 java.lang.String output_files
          Device server output files path.
 java.lang.String revision
          Revision number as String.
 DevStateTable states
          Device server states vector.
 java.lang.String templates_dir
          Device server template path.
 java.lang.String title
          Project title.
 
Fields inherited from interface pogo.gene.PogoDefs
ALREADY_OVERRIDING, ATTR_IMAGE, ATTR_READ, ATTR_READ_WITH_WRITE, ATTR_READ_WRITE, ATTR_SCALAR, ATTR_SPECTRUM, ATTR_WRITE, AttrDataArray, AttrRWtypeArray, AttrTypeArray, authorRes, classDescRes, cppAddAttrib, cppAddCommands, cppExtention, cppFile, cppLang, dataCommands, dataExtention, dataFile, dataStartCmd, dataStartStates, endGeneTag, errDetected, javaAddAttrib, javaAddCommands, javaExtention, javaFile, javaLang, languageRes, NEW_STR, NOT_OVERRIDE, outputFiles, OVERRIDE, pageTitleRes, pogoLang, projectTitleRes, readAttrProto1, readAttrProto2, readAttrProto3, readFile, revisionRes, startGeneTag, STATE, statesDescRes, STATUS, Tango_ALARM, Tango_CLOSE, Tango_CONST_DEV_STRING, Tango_DISABLE, Tango_EXTRACT, Tango_FAULT, Tango_INSERT, Tango_MOVING, Tango_OFF, Tango_ON, Tango_OPEN, Tango_RUNNING, Tango_STANDBY, Tango_TYPE_UNKNOWN, Tango_UNKNOWN, Tango_WARMUP, TangoStatesArray, templateBlock, templateClass, templateClassCmd, templateCmd, templateExecuteCmd, templateFile, writeAttrProto, writeFile
 
Fields inherited from interface TangoDs.TangoConst
Attr_Description, Attr_Name, Attr_State, Attr_Status, Attr_Unknown, Op_BlackBox, Op_Command, Op_Command_inout, Op_Command_list, Op_Get_Attr_Config, Op_Info, Op_Ping, Op_Read_Attr, Op_Set_Attr_Config, Op_Unknown, Op_Write_Attr, Req_Attribute, Req_Operation, Req_Unknown, Tango_AllAttr, Tango_AlrmValueNotSpec, Tango_AssocWritNotSpec, Tango_CmdArgTypeName, Tango_DbErr_DeviceNotDefined, Tango_DbObjName, Tango_DefaultBlackBoxDepth, Tango_DefaultDocUrl, Tango_DefaultWritableProp, Tango_DescNotSet, Tango_DEV_BOOLEAN, Tango_DEV_DOUBLE, Tango_DEV_FLOAT, Tango_DEV_LONG, Tango_DEV_SHORT, Tango_DEV_STATE, Tango_DEV_STRING, Tango_DEV_ULONG, Tango_DEV_USHORT, Tango_DEV_VOID, Tango_DevErr_AttrMandatoryProp, Tango_DevErr_AttrNoAlarm, Tango_DevErr_AttrNotFound, Tango_DevErr_AttrNotWritable, Tango_DevErr_AttrOptProp, Tango_DevErr_AttrValueNotSet, Tango_DevErr_BlackBoxArgument, Tango_DevErr_BlackBoxEmpty, Tango_DevErr_CannotOpenFile, Tango_DevErr_CantInstallSignal, Tango_DevErr_CantRetrieveClassList, Tango_DevErr_ClassNotFound, Tango_DevErr_CmdArgumentTypeNotSupported, Tango_DevErr_CommandNotAllowed, Tango_DevErr_CommandNotFound, Tango_DevErr_DeviceNotFound, Tango_DevErr_IncompatibleAttrDataType, Tango_DevErr_IncompatibleCmdArgumentType, Tango_DevErr_InitMethodNotFound, Tango_DevErr_InitNotPublic, Tango_DevErr_InitThrowsException, Tango_DevErr_JavaRuntimeSecurityException, Tango_DevErr_MemoryAllocation, Tango_DevErr_MethodArgument, Tango_DevErr_MethodNotFound, Tango_DevErr_OverloadingNotSupported, Tango_DevErr_SignalOutOfRange, Tango_DevErr_WAttrOutsideLimit, Tango_DevStateName, Tango_DEVVAR_CHARARRAY, Tango_DEVVAR_DOUBLEARRAY, Tango_DEVVAR_DOUBLESTRINGARRAY, Tango_DEVVAR_FLOATARRAY, Tango_DEVVAR_LONGARRAY, Tango_DEVVAR_LONGSTRINGARRAY, Tango_DEVVAR_SHORTARRAY, Tango_DEVVAR_STRINGARRAY, Tango_DEVVAR_ULONGARRAY, Tango_DEVVAR_USHORTARRAY, Tango_DevVersion, Tango_DSDeviceDomain, Tango_InitialOutput, Tango_MaxServerNameLength, Tango_ResNotDefined, Tango_SysProperty
 
Constructor Summary
PogoClass(java.lang.String filename)
          Constructor for Pogo Class definition from siource file.
PogoClass(java.lang.String className, java.lang.String classDesc, java.util.Vector cmdVect, java.util.Vector attrVect, java.util.Vector statesVector)
          Constructor for Pogo Class definition from main fields in parameters.
 
Method Summary
 void addAttribute(Attrib attr)
          Add a new Attrib object to the AttribTable class.
 void addCommand(Cmd cmd)
          Add a new Cmd object to the CmdTable class.
 void addState(DevState st)
          Add a new DesState object to the DevStateTable class.
private  void getIfOverrided(java.lang.String filename)
          Extract if dev_state and dev_status are overrided From File
private  void getTheClassDescription(java.lang.String filename)
          Extract class desription From File
private  void getTheProjectTitle(java.lang.String filename)
          Extract Project Title From File
private  void initializePogoFromSrcFile(java.lang.String filename, java.lang.String ext)
          Initialize Pogo struct From source File
 void setAuthor(java.lang.String name)
          Set the project Author field.
 void setRevision(java.lang.String vers)
          Set the project revision field.
 void setTitle(java.lang.String projTitle)
          Set the project title field.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

title

public java.lang.String title
Project title. Mainely used to generate the documentation title.

class_name

public java.lang.String class_name
Device server class name.

class_desc

public java.lang.String class_desc
Device server class description.

output_files

public java.lang.String output_files
Device server output files path.

templates_dir

public java.lang.String templates_dir
Device server template path.

commands

public CmdTable commands
Device server commands vector.

attributes

public AttribTable attributes
Device server attributes vector.

states

public DevStateTable states
Device server states vector.

language

public int language
Device server output language.

in_language

public int in_language
Device server input language.

author

public java.lang.String author
Author Name.

revision

public java.lang.String revision
Revision number as String.
Constructor Detail

PogoClass

public PogoClass(java.lang.String className,
                 java.lang.String classDesc,
                 java.util.Vector cmdVect,
                 java.util.Vector attrVect,
                 java.util.Vector statesVector)
          throws PogoException
Constructor for Pogo Class definition from main fields in parameters.
Parameters:
className - Device server class name
classDesc - Device server class description.
cmdVect - Device server commands vector.
attrVect - Device server attributes vector.
statesVector - Device server states vector.
Throws:
PogoException - If a synthax error occured on input file.

PogoClass

public PogoClass(java.lang.String filename)
          throws java.io.FileNotFoundException,
                 java.lang.SecurityException,
                 java.io.IOException,
                 PogoException
Constructor for Pogo Class definition from siource file.
Parameters:
filename - Input file name.
Throws:
PogoException - If a synthax error occured on input file.
java.io.FileNotFoundException -  
java.io.IOException -  
PogoException -  
Method Detail

initializePogoFromSrcFile

private void initializePogoFromSrcFile(java.lang.String filename,
                                       java.lang.String ext)
                                throws java.io.FileNotFoundException,
                                       java.lang.SecurityException,
                                       java.io.IOException,
                                       PogoException
Initialize Pogo struct From source File
Parameters:
filename - Input file name to initialize object.
ext - Input file extention. Depends on input language.
Throws:
PogoException - If a synthax error occured on input file.
java.io.FileNotFoundException -  
java.io.IOException -  
PogoException -  

getIfOverrided

private void getIfOverrided(java.lang.String filename)
                     throws java.io.FileNotFoundException,
                            java.lang.SecurityException,
                            java.io.IOException
Extract if dev_state and dev_status are overrided From File
Parameters:
filename - Input file name to initialize object.
Throws:
java.io.FileNotFoundException -  
java.io.IOException -  
java.lang.SecurityException -  

getTheProjectTitle

private void getTheProjectTitle(java.lang.String filename)
                         throws java.io.FileNotFoundException,
                                java.lang.SecurityException,
                                java.io.IOException
Extract Project Title From File
Parameters:
filename - Input file name to initialize object.
Throws:
java.io.FileNotFoundException -  
java.io.IOException -  
java.lang.SecurityException -  

getTheClassDescription

private void getTheClassDescription(java.lang.String filename)
                             throws java.io.FileNotFoundException,
                                    java.lang.SecurityException,
                                    java.io.IOException,
                                    PogoException
Extract class desription From File
Parameters:
filename - Input file name to initialize object.
Throws:
PogoException - If a synthax error occured on input file.
java.io.FileNotFoundException -  
java.io.IOException -  
PogoException -  

setRevision

public void setRevision(java.lang.String vers)
Set the project revision field.
Parameters:
name - String to set as revision

setAuthor

public void setAuthor(java.lang.String name)
Set the project Author field.
Parameters:
name - String to set as author

setTitle

public void setTitle(java.lang.String projTitle)
Set the project title field.
Parameters:
projTitle - String to set as title

addCommand

public void addCommand(Cmd cmd)
Add a new Cmd object to the CmdTable class.
Parameters:
cmd - New Cmd object to be added.

addAttribute

public void addAttribute(Attrib attr)
Add a new Attrib object to the AttribTable class.
Parameters:
attr - New Attrib object to be added.

addState

public void addState(DevState st)
Add a new DesState object to the DevStateTable class.
Parameters:
st - New DevState object to be added.

POGO Java Program