|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractCollection | +--java.util.AbstractList | +--java.util.Vector | +--atropos.util.OrderedList | +--atropos.lp.AvnmpStateQueue
This class implements the AVNMP state queue.
This research is funded by DARPA/ITO Contract Number: F30602-98-C-0230 supported by the Air Force Research Laboratory/IF.
Field Summary | |
protected java.lang.String |
QueueName
Name to identify this queue. |
Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
AvnmpStateQueue()
Construct an empty state queue. |
Method Summary | |
boolean |
add(java.lang.Object sa)
Add a subagent to the sorted table. |
void |
addStateQueue(long t,
java.lang.Object pl,
boolean p,
AvnmpLP mylp)
Cache a state in the queue. |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
Keep states ordered by save time. |
void |
deleteStateQueue(long t)
Remove a state from the queue. |
double |
getAvg(long ts,
long te)
Return the average of a set of state values from a given start time to a given end time from the state queue. |
AvnmpState |
getClosestTime(long st)
Return a pointer to the closest state based on the time. |
AvnmpState |
getGreaterOrEqualRecTime(long rt)
|
AvnmpState |
getGreaterRecTime(long rt)
|
AvnmpState |
getLessOrEqualRecTime(long rt)
|
AvnmpState |
getLessRecTime(long rt)
|
AvnmpState |
getStateQueue(long t)
Return a state based on time. |
AvnmpStateQueue |
getStates(long ts,
long te)
Retrieve a set of state values from a given start time to a given end time. |
void |
plotQueue(AvnmpLP mylp)
Generate a gnuplot data file of the current state of the queue. |
java.lang.String |
QtoString()
Display the state queue. |
void |
rbstate(long t)
Remove states which are invalid after a given time. |
boolean |
remove(java.lang.Object sa)
Remove from the sorted table. |
void |
RemoveFossils(long t)
Remove messages with a value less than the given time. |
void |
updateSnmpObjects(snmp.agent.AppCommunicator c,
java.lang.String pLoadOid,
java.lang.String pTimeOid,
AvnmpTime lvt,
AvnmpTime t,
AvnmpLP mylp)
Update the SNMP agent with the entire contents of the state queue. |
Methods inherited from class atropos.util.OrderedList |
clear, get, remove |
Methods inherited from class java.util.Vector |
add, addAll, addAll, addElement, capacity, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
Field Detail |
protected java.lang.String QueueName
Constructor Detail |
public AvnmpStateQueue()
Method Detail |
public boolean add(java.lang.Object sa)
add
in class OrderedList
public boolean remove(java.lang.Object sa)
remove
in class java.util.Vector
public void rbstate(long t)
t
- Time after which all predictions should be removed.public void addStateQueue(long t, java.lang.Object pl, boolean p, AvnmpLP mylp)
t
- Time state is validpl
- Statep
- true indicates a predicted state, false a real statemylp
- The logical process objectpublic void deleteStateQueue(long t)
t
- Delete state based on the timepublic AvnmpState getStateQueue(long t) throws NotFoundInQueueException
t
- Time state is validpublic AvnmpState getGreaterRecTime(long rt) throws NotFoundInQueueException
rt
- Timepublic AvnmpState getGreaterOrEqualRecTime(long rt) throws NotFoundInQueueException
rt
- Timepublic AvnmpState getLessRecTime(long rt) throws NotFoundInQueueException
rt
- Timepublic AvnmpState getLessOrEqualRecTime(long rt) throws NotFoundInQueueException
rt
- Timepublic AvnmpState getClosestTime(long st) throws NotFoundInQueueException
st
- Timepublic java.lang.String QtoString()
public void plotQueue(AvnmpLP mylp)
mylp
- The logical process in which this object resides.public AvnmpStateQueue getStates(long ts, long te)
ts
- start timete
- end timepublic double getAvg(long ts, long te)
ts
- start timete
- end timepublic void updateSnmpObjects(snmp.agent.AppCommunicator c, java.lang.String pLoadOid, java.lang.String pTimeOid, AvnmpTime lvt, AvnmpTime t, AvnmpLP mylp)
c
- The SNMP agent contextpLoadOid
- The predicted load object idpTimeOid
- The predicted time for the above load objectlvt
- The current object's LVTt
- The current wallclock time for this LPmylp
- The current LPpublic int compare(java.lang.Object o1, java.lang.Object o2)
compare
in class OrderedList
public void RemoveFossils(long t)
t
- Remove values less than this time.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |