POGO Java Program


pogo.gene
Class PogoGeneJava

java.lang.Object
  |
  +--pogo.gene.PogoGene
        |
        +--pogo.gene.PogoGeneJava

public class PogoGeneJava
extends PogoGene
implements PogoDefs, TangoDs.TangoConst

This class generates Java source file.


Fields inherited from class pogo.gene.PogoGene
pogo, sbTrace
 
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
PogoGeneJava(PogoClass pogo)
          Constructor for Pogo Class Java files generation.
 
Method Summary
protected  void addClassToMakefile(java.lang.String f_in, java.lang.String f_out)
          In the makefile, the only class to be compiled, is by default the device server class.
protected  void AddExecuteMethod(Cmd cmd, java.lang.String f_in, java.lang.String f_out)
          Add in the out File, in the methods, a block to call the method where command is really executed.
protected  void addMethodsToExecuteCmd(java.lang.String f_in, java.lang.String f_out)
          Add in the out File, the methods where the commands are really executed.
protected  void buildFactories(java.lang.String f_in, java.lang.String f_out)
          Add commands class to the list to be called
 void geneSrc()
          Generate java source for tango device Server from Pogo Class definition.
protected  void manageAttributes(java.lang.String f_in, java.lang.String f_out)
          In the server, the attribute management will be done only if attributes are defined in Pogoclass object.
 
Methods inherited from class pogo.gene.PogoGene
addCommentsCmdMethod, buildAttributesMethods, buildReadMeFile, changeExeMethodArgs, checkForExecMethodModif, copyFile, getTrace, mustGenerate, readAttributeTemplate, replacePatternFile, setMethodInComments, setProjectTitle
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

PogoGeneJava

public PogoGeneJava(PogoClass pogo)
Constructor for Pogo Class Java files generation.
Parameters:
pogo - Pogo Class definition used for generation.
Method Detail

AddExecuteMethod

protected void AddExecuteMethod(Cmd cmd,
                                java.lang.String f_in,
                                java.lang.String f_out)
                         throws java.io.IOException,
                                PogoException
Add in the out File, in the methods, a block to call the method where command is really executed.
Parameters:
cmd - Command Object Treated
f_in - Input file name
f_out - Output file name
Throws:
java.io.IOException -  
PogoException - If a synthax error occured on input file.

addMethodsToExecuteCmd

protected void addMethodsToExecuteCmd(java.lang.String f_in,
                                      java.lang.String f_out)
                               throws java.io.IOException,
                                      PogoException
Add in the out File, the methods where the commands are really executed.
Parameters:
f_in - Input File's name
f_out - Output File's name
Throws:
java.io.IOException -  
PogoException - If a synthax error occured on input file.

addClassToMakefile

protected void addClassToMakefile(java.lang.String f_in,
                                  java.lang.String f_out)
                           throws java.io.IOException,
                                  PogoException
In the makefile, the only class to be compiled, is by default the device server class. This method add the DevServerClass class and one class for each command.
Parameters:
f_in - Input File's name
f_out - Output File's name
Throws:
java.io.IOException -  
PogoException - If a synthax error occured on input file.

manageAttributes

protected void manageAttributes(java.lang.String f_in,
                                java.lang.String f_out)
                         throws java.io.IOException,
                                PogoException
In the server, the attribute management will be done only if attributes are defined in Pogoclass object.
Parameters:
f_in - Input File's name
f_out - Output File's name
Throws:
java.io.IOException -  
PogoException - If a synthax error occured on input file.

buildFactories

protected void buildFactories(java.lang.String f_in,
                              java.lang.String f_out)
                       throws java.io.IOException,
                              PogoException
Add commands class to the list to be called
Parameters:
f_in - Input File's name
f_out - Output File's name
Throws:
java.io.IOException -  
PogoException - If a synthax error occured on input file.

geneSrc

public void geneSrc()
             throws java.io.FileNotFoundException,
                    java.lang.SecurityException,
                    java.io.IOException,
                    PogoException
Generate java source for tango device Server from Pogo Class definition.
Throws:
java.io.FileNotFoundException -  
java.lang.SecurityException -  
java.io.IOException -  
PogoException - If a synthax error occured on input file.

POGO Java Program