|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EDU.gatech.cc.is.abstractrobot.ControlSystemS | +--EDU.gatech.cc.is.abstractrobot.ControlSystemMFN150 | +--nslj.src.lang.NslBase | +--nslj.src.lang.NslHierarchy | +--nslj.src.lang.NslModule
Field Summary | |
protected double |
_approximationDelta
|
protected boolean |
_bufferingChanged
|
protected NslDiff |
_diff_method
|
protected boolean |
_doubleBuffering
|
protected java.util.Vector |
_inports
|
protected java.util.Vector |
_moduleChildren
|
protected java.util.Vector |
_outports
|
protected java.util.Vector |
_protocols
|
protected double |
_runDelta
|
protected boolean |
_runDeltaChanged
|
protected double |
_timeConstantTM
|
protected double |
_trainDelta
|
protected boolean |
_trainDeltaChanged
|
int |
child_c
|
int |
ID
|
java.lang.String |
ID_str
|
java.lang.String |
order_str
|
boolean |
postorder
|
Fields inherited from class nslj.src.lang.NslHierarchy |
nslClassInstances, nslDataVars, system |
Fields inherited from class nslj.src.lang.NslBase |
_accessChar, _name, _parent |
Fields inherited from class EDU.gatech.cc.is.abstractrobot.ControlSystemMFN150 |
abstract_robot |
Fields inherited from class EDU.gatech.cc.is.abstractrobot.ControlSystemS |
CSSTAT_DONE, CSSTAT_ERROR, CSSTAT_OK, seed |
Constructor Summary | |
NslModule()
Bare Constructor. |
|
NslModule(java.lang.String label)
Default constructor. |
|
NslModule(java.lang.String label,
NslModule parent)
Default constructor. |
|
NslModule(java.lang.String label,
NslModule parent,
java.lang.String options)
|
Method Summary | |
boolean |
connect(NslModule child1,
java.lang.String name1,
NslModule child2,
java.lang.String name2)
Connect two child modules and add the nslConnection to the scheduler The nslConnection is done in two phases. |
void |
endModule()
|
void |
endrun()
|
void |
endRun()
|
void |
endRunEpoch()
|
void |
endsys()
|
void |
endSys()
|
void |
endTrain()
|
void |
endTrainEpoch()
|
protected void |
finalize()
|
void |
initModule()
|
void |
initrun()
Initialization step of this module. |
void |
initRun()
|
void |
initRunEpoch()
|
void |
initsys()
|
void |
initSys()
|
void |
initTrain()
|
void |
initTrainEpoch()
|
void |
makeConn()
Make the nslConnection between child modules. |
void |
makeinst(java.lang.String name,
NslModule p)
Instantiation the internal variable of this object. |
void |
makeInst(java.lang.String name,
NslModule p)
|
void |
nslAddExistingInport(NslInport inport)
Add an inport to the current inport list |
void |
nslAddExistingOutport(NslOutport outport)
Add an Outport to the current outport list |
NslNumeric |
nslAddInport(NslNumeric n)
Create an inport which makes reference to a Numeric object |
NslNumeric |
nslAddInport(java.lang.String name,
NslNumeric n)
Create an inport which makes reference to an Object |
void |
nslAddModelPlots(NslFrame df)
|
void |
nslAddModelPlots(NslFrame df,
java.lang.String s)
|
NslNumeric |
nslAddOutport(NslNumeric n)
Create an outport which makes reference to a NslNumeric |
NslNumeric |
nslAddOutport(java.lang.String name,
NslNumeric n)
Create an outport which makes reference to an Object |
void |
nslAddProtocolRecursiveDown(java.lang.String name)
|
void |
nslAddProtocolRecursiveUp(java.lang.String name)
|
void |
nslAddToModuleChildren(NslModule child)
Add child module into this module and into the scheduler |
void |
nslConnChildren()
Call child modules to nslConnect their own internal modules recursively. |
boolean |
nslConnect(nslj.src.lang.NslConnection link)
Connect two modules using defined link |
boolean |
nslConnect(NslModule child1,
java.lang.String name1,
NslModule child2,
java.lang.String name2)
|
boolean |
nslConnect(NslNumeric num1,
NslNumeric num2)
|
void |
nslConnMissingLinks()
Call child modules to nslConnect their missing links, if possible It checks the _missing_links vector for the nslConnection required. |
void |
nslDeclareProtocol(java.lang.String name)
|
void |
nslDeclareProtocol(java.lang.String name,
java.lang.String label)
|
NslNumeric |
nslDummy(NslNumeric n)
|
double |
nslGetApproximationDelta()
get integration time step / numerical method time step tm |
NslDiff |
nslGetApproximationMethod()
|
boolean |
nslGetBuffering()
|
double |
nslGetDelta()
get run or train step size depending on simulation mode, delta t |
boolean |
nslGetEnableFlag()
|
java.lang.String |
nslGetId_str()
|
int |
nslGetId()
|
java.util.Vector |
nslGetInportsVector()
|
java.util.Vector |
nslGetModuleChildrenVector()
define the scheduler to use |
NslModule |
nslGetModuleRef(java.lang.String name)
Get a child module with name |
NslModule |
nslGetModuleRefByName(java.lang.String tempName)
Get a child module with name |
java.lang.String |
nslGetOrderStr()
|
java.util.Vector |
nslGetOutportsVector()
|
NslPort |
nslGetPort(java.lang.String name)
Get a port with name name |
java.util.Vector |
nslGetProtocols()
|
double |
nslGetRunDelta()
get run step size, delta t |
boolean |
nslGetRunEnableFlag()
Examine whether the module runs on execution command run or step |
double |
nslGetTrainDelta()
get train step size, delta t |
boolean |
nslGetTrainEnableFlag()
Examine whether the module runs on execution command run or step |
boolean |
nslHasChildModule(java.lang.String s)
|
void |
nslInitTempModule()
|
void |
nslInitTempRun()
|
void |
nslInitTempRunEpoch()
|
void |
nslInitTempTrain()
|
void |
nslInitTempTrainEpoch()
|
void |
nslInitWindow()
|
void |
nslinitwindow(NslFrame df)
|
void |
nslInitWindow(NslFrame df)
|
void |
nslinitwindow(NslFrame df,
java.lang.String s)
|
void |
nslInitWindow(NslFrame df,
java.lang.String s)
|
void |
nslPrintChildModules()
|
void |
nslRemoveFromLocalProtocols(java.lang.String name)
|
void |
nslResetBuffering()
|
void |
nslResetRunDelta()
|
void |
nslResetTrainDelta()
|
void |
nslSetAccessRecursive(char new_desiredAccess)
|
void |
nslSetApproximationDelta(double t)
To set the time step size |
void |
nslSetApproximationMethod(NslDiff dm)
|
void |
nslSetBuffering(boolean v)
|
void |
nslSetDisplayFrame(NslFrame df)
|
void |
nslSetId(NslModule parent,
int id)
|
void |
nslSetModuleSpecificParams()
|
void |
nslSetModuleSpecificParams(java.lang.String label,
NslModule parent)
|
void |
nslSetModuleSpecificParams2()
|
void |
nslSetProtocolFlagRecursiveDown(java.lang.String name)
|
void |
nslSetRunDelta(double t)
|
void |
nslSetRunDeltaRecursive(double t)
set run step size, delta t. |
void |
nslSetRunEnableFlag(boolean b)
To set if the module runs on execution command run or step. |
void |
nslSetTrainDelta(double t)
|
void |
nslSetTrainDeltaRecursive(double t)
set train step size, delta t. |
void |
nslSetTrainEnableFlag(boolean b)
To set if the module runs on execution command run or step. |
void |
nslUpdateBuffering()
|
void |
nslUpdateBuffers()
Update the status of all _outports. |
NslData |
nslValParent(java.lang.String name)
|
void |
run()
Call when multi-threaded. |
void |
runsim()
The run block of this module |
void |
simrun()
|
void |
simRun()
|
void |
simTrain()
|
Methods inherited from class nslj.src.lang.NslBase |
nslGetAccess, nslGetName, nslGetParent, nslGetParentClass, nslGetParentModule, nslGetRealName, nslNullifyParent, nslSetAccess, nslSetName, nslSetParent |
Methods inherited from class EDU.gatech.cc.is.abstractrobot.ControlSystemMFN150 |
init |
Methods inherited from class EDU.gatech.cc.is.abstractrobot.ControlSystemS |
configure, Configure, getAbstractRobot, Init, quit, takeStep, TakeStep, trialEnd, TrialEnd, trialInit, TrialInit |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected double _runDelta
protected double _trainDelta
protected boolean _trainDeltaChanged
protected boolean _runDeltaChanged
protected double _timeConstantTM
protected double _approximationDelta
protected NslDiff _diff_method
protected boolean _doubleBuffering
protected boolean _bufferingChanged
protected java.util.Vector _protocols
protected java.util.Vector _moduleChildren
protected java.util.Vector _inports
protected java.util.Vector _outports
public java.lang.String ID_str
public java.lang.String order_str
public int ID
public int child_c
public boolean postorder
Constructor Detail |
public NslModule()
public NslModule(java.lang.String label)
label
- - the name of the modulepublic NslModule(java.lang.String label, NslModule parent)
label
- - the name of the moduleparent
- - the reference of the module's parent modulepublic NslModule(java.lang.String label, NslModule parent, java.lang.String options)
Method Detail |
public void nslSetModuleSpecificParams()
public void nslSetModuleSpecificParams(java.lang.String label, NslModule parent)
public void nslSetModuleSpecificParams2()
public java.util.Vector nslGetModuleChildrenVector()
schduler
- public static void nslSetScheduler(NslSchduler sch) {
scheduler = sch;
}public java.util.Vector nslGetInportsVector()
public java.util.Vector nslGetOutportsVector()
public void nslSetId(NslModule parent, int id)
public int nslGetId()
public java.lang.String nslGetId_str()
public java.lang.String nslGetOrderStr()
public void nslAddToModuleChildren(NslModule child)
child
- - child NslModulepublic NslModule nslGetModuleRef(java.lang.String name)
name-
- name of target child modulepublic NslModule nslGetModuleRefByName(java.lang.String tempName)
name-
- name of target child modulepublic void nslSetAccessRecursive(char new_desiredAccess)
nslSetAccessRecursive
in class NslHierarchy
public boolean nslHasChildModule(java.lang.String s)
public void nslPrintChildModules()
public NslNumeric nslAddOutport(java.lang.String name, NslNumeric n)
name
- name of this outportn
- reference to a single objectNullPointerException
- if n is not definedpublic NslNumeric nslAddOutport(NslNumeric n)
name
- name of this outportn
- reference to a NslNumeric, can be NslNumeric0, NslNumeric1 or NslNumeric2NullPointerException
- if n is not definedpublic void nslAddExistingOutport(NslOutport outport)
outport
- the outport to be addedNullPointerException
- if outport is nullpublic NslNumeric nslAddInport(java.lang.String name, NslNumeric n)
name
- name of this intportn
- reference to a NslNumeric, can be NslNumeric0, NslNumeric1 or NslNumeric2NullPointerException
- if n is nullpublic NslNumeric nslAddInport(NslNumeric n)
name
- name of this intportn
- reference to a NslNumeric,
can be NslNumeric0, NslNumeric1 or NslNumeric2 or NslNumeric3 or NslNumeric4NullPointerException
- if n is nullpublic void nslAddExistingInport(NslInport inport)
inport
- the inport to be addedNullPointerException
- if inport is nullpublic NslPort nslGetPort(java.lang.String name)
name
- name of target portpublic NslNumeric nslDummy(NslNumeric n)
public boolean connect(NslModule child1, java.lang.String name1, NslModule child2, java.lang.String name2)
+-NslModule Top-----------------------------------------------+ | +-NslModule A----------+ +-NslModule B-------------+ | | | +-NslModule a---+ | | +-NslModule b-----+ | | | | | variable x | 1 | 2 | 3 | variable y | | | | | | |o##o|o#####i|i###i|i | | | | | | | | | | | | | | | +---------------+ | | +-----------------+ | | | +----------------------+ +-------------------------+ | +-------------------------------------------------------------+ o outport i intport ### nslConnectionAssume we are at the top level in the hierarchy: NslModule Top and we are going to nslConnect two modules, NslModule A and NslModule B. All links #1, #2, #3 are not available. In general case, we need to nslConnect all the links internal to the child modules first, ie #1, and #3.
child1
- From module child1name1
- Port of child1child2
- To module child2name2
- Port of child2NslModule#nslConnChildren_callinitsys
,
Side Effect: change missing_link: all links not established
is stored in missing_link
public boolean nslConnect(NslNumeric num1, NslNumeric num2)
public boolean nslConnect(NslModule child1, java.lang.String name1, NslModule child2, java.lang.String name2)
public boolean nslConnect(nslj.src.lang.NslConnection link)
link
- The nslConnection between two modulespublic void nslConnChildren()
NslModule#nslConn
,
nslConnMissingLinks()
public void nslConnMissingLinks()
NslModule#nslConn
,
NslModule#nslConnChildren_callinitsys
public double nslGetDelta()
public double nslGetRunDelta()
public void nslSetRunDeltaRecursive(double t)
t
- step sizepublic void nslSetRunDelta(double t)
public void nslResetRunDelta()
public double nslGetTrainDelta()
public void nslSetTrainDeltaRecursive(double t)
t
- step sizepublic void nslSetTrainDelta(double t)
public void nslResetTrainDelta()
public boolean nslGetTrainEnableFlag()
public void nslSetTrainEnableFlag(boolean b)
b
- true if active, false if idlepublic boolean nslGetRunEnableFlag()
public boolean nslGetEnableFlag()
public void nslSetRunEnableFlag(boolean b)
b
- true if active, false if idlepublic double nslGetApproximationDelta()
public void nslSetApproximationDelta(double t)
t
- time step sizepublic NslDiff nslGetApproximationMethod()
public void nslSetApproximationMethod(NslDiff dm)
public void nslUpdateBuffers()
public void nslSetBuffering(boolean v)
public boolean nslGetBuffering()
public void nslResetBuffering()
public void nslUpdateBuffering()
public void run()
run
in interface java.lang.Runnable
NslModule#execute
protected void finalize()
finalize
in class java.lang.Object
public void makeinst(java.lang.String name, NslModule p)
public void makeInst(java.lang.String name, NslModule p)
public void initsys()
public void initSys()
public void endsys()
public void endSys()
public void initModule()
public void endModule()
public void initrun()
public void initRun()
public void endrun()
public void endRun()
public void makeConn()
public void runsim()
public void simrun()
public void initRunEpoch()
public void simRun()
public void endRunEpoch()
public void initTrainEpoch()
public void initTrain()
public void simTrain()
public void endTrain()
public void endTrainEpoch()
public java.util.Vector nslGetProtocols()
public void nslRemoveFromLocalProtocols(java.lang.String name)
public void nslAddProtocolRecursiveDown(java.lang.String name)
public void nslAddProtocolRecursiveUp(java.lang.String name)
public void nslDeclareProtocol(java.lang.String name, java.lang.String label)
public void nslDeclareProtocol(java.lang.String name)
public void nslSetProtocolFlagRecursiveDown(java.lang.String name)
public NslData nslValParent(java.lang.String name)
public void nslSetDisplayFrame(NslFrame df)
public void nslAddModelPlots(NslFrame df)
public void nslAddModelPlots(NslFrame df, java.lang.String s)
public void nslInitTempRun()
public void nslInitTempTrain()
public void nslInitTempModule()
public void nslInitTempRunEpoch()
public void nslInitTempTrainEpoch()
public void nslinitwindow(NslFrame df)
public void nslinitwindow(NslFrame df, java.lang.String s)
public void nslInitWindow(NslFrame df)
public void nslInitWindow(NslFrame df, java.lang.String s)
public void nslInitWindow()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |