Real-Time Java AOCS Framework v1.0 API Specification

RtjAocsFramework.TelecommandManagement
Class TestTelecommandLoader

java.lang.Object
  |
  +--RtjAocsFramework.TelecommandManagement.TestTelecommandLoader
All Implemented Interfaces:
ActiveObject, TelecommandLoader

public class TestTelecommandLoader
extends Object
implements TelecommandLoader

Telecommand loader to be used for off-line tests. Telecommands are loaded as raw telecommands through method loadRawTelecommand. A raw telecommands is a sequence of bytes that represents the telecommand. The telecommand loader interprets the raw telecommand and then creates and configures the corresponding telecommand object. The telecommand object is then loaded into the telecommand manager. Telecommands objects are created dynamically using the 'new' operator. Their deletion is left to the Java garbage collection.

The ActiveObject interface (which is part of the TelecommandLoader interface) is not implemented (or, more precisely, only a dummy implementation is provided.

Copyright: see the Copyright Notice.

Version:
1.0
Author:
Alessandro Pasetti (University of Konstanz)
See Also:
The Telecommand Management Framelet Document.

Constructor Summary
TestTelecommandLoader()
           
 
Method Summary
 int getReleaseCounter()
          Return the release counter that is incremented by one every time method release() is called.
 TelecommandManager getTelecommandManager()
           
 boolean initialize()
          Initialize an active object before it is scheduled.
 void loadRawTelecommand(int[] rawTc, Object obj)
          Load a raw telecommand given as an array of integers and an additional object argument.
 void release(int TelecommandId)
          Release of the memory allocated to the telecommand object is performed automatically by the garbage collector and this method therefore has only a dummy implementation.
 void release(Telecommand telecommand)
          Release resources allocated to argument telecommand.
 void releaseAll()
          Release all resources allocated to the currently loaded telecommands.
 void runOneCycle(int deadline)
          Perform all actions associated to the current cycle.
 void setTelecommandManager(TelecommandManager m)
          A telecommand loader needs a reference to the telecommand manager in order to be able to add the newly-loaded telecommands to its list of pending telecommands.
 boolean terminate()
          Perfrom any shutdown actions before an active is de-scheduled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestTelecommandLoader

public TestTelecommandLoader()
Method Detail

release

public void release(int TelecommandId)
Release of the memory allocated to the telecommand object is performed automatically by the garbage collector and this method therefore has only a dummy implementation.

Specified by:
release in interface TelecommandLoader
See Also:
TelecommandLoader.release(int)

getReleaseCounter

public int getReleaseCounter()
Return the release counter that is incremented by one every time method release() is called. This method is useful during testing.


releaseAll

public void releaseAll()
Description copied from interface: TelecommandLoader
Release all resources allocated to the currently loaded telecommands.

Specified by:
releaseAll in interface TelecommandLoader
See Also:
release(int)

setTelecommandManager

public void setTelecommandManager(TelecommandManager m)
Description copied from interface: TelecommandLoader
A telecommand loader needs a reference to the telecommand manager in order to be able to add the newly-loaded telecommands to its list of pending telecommands.

Specified by:
setTelecommandManager in interface TelecommandLoader

getTelecommandManager

public TelecommandManager getTelecommandManager()
Specified by:
getTelecommandManager in interface TelecommandLoader
See Also:
TelecommandLoader.setTelecommandManager(TelecommandManager)

runOneCycle

public void runOneCycle(int deadline)
Description copied from interface: ActiveObject
Perform all actions associated to the current cycle.

Specified by:
runOneCycle in interface ActiveObject
Parameters:
deadline - deadline by which the object must have returned. This parameter allows implementation of cooperative scheduling.

initialize

public boolean initialize()
Description copied from interface: ActiveObject
Initialize an active object before it is scheduled.

Specified by:
initialize in interface ActiveObject
Returns:
true if initialization was successful.

terminate

public boolean terminate()
Description copied from interface: ActiveObject
Perfrom any shutdown actions before an active is de-scheduled.

Specified by:
terminate in interface ActiveObject
Returns:
true if shutdown was successful.

loadRawTelecommand

public void loadRawTelecommand(int[] rawTc,
                               Object obj)
Load a raw telecommand given as an array of integers and an additional object argument. The format of the array of integers is as follows: integer 0 = telecommand type identifier (it is assumed that the telecommand type identifier is the same as the class identifier of the class encapsulating the telecommand); integer 1 = time tag; integers 2 to n = telecommand specific data. The interpretation of the object argument depends on the telecommand type.


release

public void release(Telecommand telecommand)
Description copied from interface: TelecommandLoader
Release resources allocated to argument telecommand.

Specified by:
release in interface TelecommandLoader
See Also:
release(int)

Real-Time Java AOCS Framework v1.0 API Specification

Real-Time Java AOCS Framework project home page

Automatic Control Laboratory, ETH Zuerich
Physikstrasse 3
CH-8092 Zuerich, Switzerland